On Thu, Aug 29, 2002 at 02:45:20PM +0900, luc wrote:
Is the line 66 in sqlvalidator.php3 strange?
What do you mean by 'strange' ?
It never reach to the line 69. pear installed.
if I modify this codes to reject !isset() below
if (!$GLOBALS['sqlvalidator_error']) { // create new class instance $srv = new PMA_SQLValidator(); // line 69
then it reaches to the line 69. Why?
I don't understand. Thank you.
If you are using the CVS tree, I just made a change to fix that bug. It was a logic error that there was a || there instead of &&
It was: if (!(isset($GLOBALS['sqlvalidator_error']) || !$GLOBALS['sqlvalidator_error'])) { // create new class instance $srv = new PMA_SQLValidator();
Now it is: if (!(isset($GLOBALS['sqlvalidator_error']) && !$GLOBALS['sqlvalidator_error'])) { // create new class instance $srv = new PMA_SQLValidator();
Because the first case caused a complete evaluation on the globals on my system, and spat out an error from that. Notice: Undefined index: sqlvalidator_error in /home/robbat2/cvs/phpMyAdmin/libraries/sqlvalidator.lib.php3 on line 67
This line was really deceptive, as it really says: if NOT ( isset($GLOBALS['...']) AND NOT $GLOBALS['...'] )
I'm still not 100% that I have my logic correct their either.