Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make Zend Studio happy :)

Code Analyzer Output:

Variable $errno was used before it was defined (line 221)
Variable $errstr was used before it was defined (line 221)

Category: Coding Style

A local variable is used before it is defined.
Even though PHP initializes variables with empty values on the first use,
it is considered a good practice to explicitly initialize variables
to make code more readable and avoid unnecessary bugs.
  • Loading branch information...
commit ef10728a74c39b8ebb2594aba8d939ee26fbb7df 1 parent 0960421
ethem authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  enrol/authorize/authorizenetlib.php
View
1  enrol/authorize/authorizenetlib.php
@@ -217,6 +217,7 @@ function authorize_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE, $
$referer = "Referer: $CFG->an_referer\r\n";
}
+ $errno = 0; $errstr = '';
$host = $test ? 'certification.authorize.net' : 'secure.authorize.net';
$fp = fsockopen("ssl://$host", 443, $errno, $errstr, 60);
if (!$fp) {
Please sign in to comment.
Something went wrong with that request. Please try again.