class EditResultGenerator extends MethodGenerator {
function EditResultGenerator() {}
function &getResult($album = '') {
// THE VARIABLE $album could have a value or be NULL or have an "illegal placeholder" (i.e., a value that is not a legitimate "album" or directory name)
if (!preg_match('/[^a-zA-Z0-9\-_\.\+\s\t]+/i', $album)) unset($album, $_REQUEST['album']);
list($GLOBALS['album'], $_REQUEST['album']) = array($album, $album); // I THOUGHT THAT WOULD SET IT UPON EXITING THE METHOD
// DO MORE STUFF
return $stuff;
}
}
// THE MOMENT YOU LEAVE THIS METHOD, IF $album = "***ILLEGAL PLACEHOLDER***" THEN $album SHOULD = NULL BUT IT DOESN'T IT = "***ILLEGAL PLACEHOLDER***"
This occurs within PHP 5.0.4 and in PHP 4.3.11, however, does not occur in PHP 4.3.2.
In the class method I have an optional parameter $album, because $album might be a directory name, "ILLEGAL PLACEHOLDER" which can never be a directory name, or "" (NULL). If it's "ILLEGAL PLACEHOLDER", $album must be reset to NULL, however, I can't do that. I know in PHP it's illegal to pass an optional parameter by reference, but that'd be the only way I could do that.
Anyone have any suggestions?
Thanx
Phil