Fix For Phoogle
Posted by justinjohnson on Nov 11th, 2008
This is for the error: Fatal error: Cannot use string offset as an array in /includes/phoogle.php on line 137 , which just started popping up today.
I haven't had time to update the source files yet, but Michael Clark sent along the following fix that seems to work. I'll post an updated php file ASAP
PHP:
-
it's a minor patch -
-
add:
-
if(!trim($data)) return;
-
as the new first line of the characterData function
November 11th, 2008 at 7:14 pm
Are you going to include to the change for the [Response] offset? Shouldn’t it be [’Response’]?
http://forums.digitalpoint.com/showthread.php?p=9779114#post9779114
I’m also getting this error every other time I refresh the page:
I also get an error with an undefined offset at line 336. This error happens every other time I refresh the page.
phoogle.php
Line 332: function endElement($parser, $name)
Line 333: {
Line 334: $key=array_pop($this->keys);
Line 335: if($this->node_flag==1){
Line 336: $this->arrays[$this->depth][$key]=$this->arrays[$this->depth+1];
Line 337: unset($this->arrays[$this->depth+1]);
Line 338: }
Line 339: $this->node_flag=1;
Line 340: $this->depth–;
Line 341: }
By the way! Great module!
November 12th, 2008 at 1:37 am
Sweet that worked does anyone have any idea why this just popped up?