Fix For Phoogle
Nov 11, 2008 CakePHP, Code, General, Phoogle, Web Dev
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
it’s a minor patch -
| PHP | | copy code | | ? |
| 1 | |
| 2 | //add as the new first line of the characterData function |
| 3 | if(!trim($data)) return; |
| 4 |



November 11th, 2008 at 7:14 pm
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
January 26th, 2009 at 8:53 pm
i’m getting the same error as nick leung quite often. Does anyone know a way to fix this….
thanks
April 3rd, 2009 at 7:16 am