Debugging error help please

Debugging error help please

by Will Cunningham -
Number of replies: 5
Im getting this error:

Notice
: Only variable references should be returned by reference in /***/***/public_html/lib/adodb/drivers/adodb-mysql.inc.php on line 641

Any ideas how to fix that? I've tried searching but with no such luck.
Average of ratings: -
In reply to Will Cunningham

Re: Debugging error help please

by Ken Wilson -

Seems there's a referencing problem with the adodb files - try http://moodle.org/mod/forum/discuss.php?d=27453#p132295, where a possible solution is shown. Which version of moodle are you installing? (as it may be a new bug which needs reporting if the above link does not fix the problem)

Ken

In reply to Ken Wilson

Re: Debugging error help please

by Will Cunningham -
Yes I had that error also and doing what it suggested fixed that error but not this one.

This is the line of code it is referencing:
Line 635 else if ($fieldOffset == -1) { /* The $fieldOffset argument is not provided thus its -1 */
Line 636 $o = @mysql_fetch_field($this->_queryID);
Line 637 $o->max_length = @mysql_field_len($this->_queryID); // suggested by: Jim Nicholson (jnich@att.com)
Line 638 //$o->max_length = -1; // mysql returns the max length less spaces -- so it is unrealiable
Line 639 }
Line 640
Line 641 return $o;
Line 642 }

Moodle Version: 1.7.2
Mysql: 5.0.24
PHP: 4.4.1
In reply to Ken Wilson

Re: Debugging error help please

by Mauno Korpelainen -

Using the same idea the problem could be here (try to take that & away):

626      function &FetchField($fieldOffset = -1)
 627      {   
 628          if ($fieldOffset != -1) {
 629              $o = @mysql_fetch_field($this->_queryID, $fieldOffset);
 630              $f = @mysql_field_flags($this->_queryID,$fieldOffset);
 631              $o->max_length = @mysql_field_len($this->_queryID,$fieldOffset); // suggested by: Jim Nicholson (jnich@att.com)
 632              //$o->max_length = -1; // mysql returns the max length less spaces -- so it is unrealiable
 633              $o->binary = (strpos($f,'binary')!== false);
 634          }
 635          else if ($fieldOffset == -1) {    /*    The $fieldOffset argument is not provided thus its -1     */
 636              $o = @mysql_fetch_field($this->_queryID);
 637          $o->max_length = @mysql_field_len($this->_queryID); // suggested by: Jim Nicholson (jnich@att.com)
 638          //$o->max_length = -1; // mysql returns the max length less spaces -- so it is unrealiable
 639          }
 640             
 641          return $o;
 642      }

In reply to Mauno Korpelainen

Re: Debugging error help please

by Will Cunningham -
I removed the & and the error went away. Not sure if it will affect anything else but so far so good. Thanks.
In reply to Will Cunningham

Re: Debugging error help please

by Pedro Guevara -

Hi will. I have exactly the same problem. I removed the "&" and it seems to work.

Now I have a similar problem when I login in adodb.inc.php

Did you had any problems with this bug fix?

Thanks