I was running with display_errors enabled and noticed some PHP warnings for undefined variables/indexes in a few files.
The first is in include/commonfuncs.php in the cvc() function (currently lines 693 and 694), for $regexvowel and $regex_consonant variables. Looks like these just need to be declared as global like the other functions do, eg:
function cvc($str)
{
global $regex_vowel, $regex_consonant;
$c = $regex_consonant;
$v = $regex_vowel;
The other is in admin/spiderfuncs.php in the url_purify() function (line 397), for an undefined index. I'm not really sure what's going on here to be honest:
if (isset($urlparts['query'])) {
if ($apache_indexes[$urlparts['query']])
return '';
}
If it's just testing if the variable is defined then an isset() alone may work, but if it's actually testing the value of the variable (0 or 1, empty or non-empty string, etc) then that's no good and you'd probably want an isset() and then the var check, eg:
if (isset($urlparts['query'])) {
if (isset($apache_indexes[$urlparts['query']]) && $apache_indexes[$urlparts['query']])
return '';
}
Hi,
I was running with display_errors enabled and noticed some PHP warnings for undefined variables/indexes in a few files.
The first is in include/commonfuncs.php in the cvc() function (currently lines 693 and 694), for $regexvowel and $regex_consonant variables. Looks like these just need to be declared as global like the other functions do, eg:
The other is in admin/spiderfuncs.php in the url_purify() function (line 397), for an undefined index. I'm not really sure what's going on here to be honest:
If it's just testing if the variable is defined then an isset() alone may work, but if it's actually testing the value of the variable (0 or 1, empty or non-empty string, etc) then that's no good and you'd probably want an isset() and then the var check, eg: