CodeIgniter Forums
httpcache-class.php Error Message - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: httpcache-class.php Error Message (/showthread.php?tid=27528)



httpcache-class.php Error Message - El Forum - 02-13-2010

[eluser]Unknown[/eluser]
I am not too familiar with the httpcahe-class, does any know why this error could be getting thown?

Code:
Severity: Notice
Message: Undefined variable: hash_name
Filename: php/httpcache-class.php
Line Number: 92

I believe I've narrowed it down to a

Code:
$file_contents = file_get_contents("http://domain.com/my_xml_file.xml");
$xml_result = new SimpleXMLElement($file_contents);


call in my controller, but this same code has worked fine on other sites.

Any thoughts?

Thanks in advance.


httpcache-class.php Error Message - El Forum - 02-13-2010

[eluser]Unknown[/eluser]
I forgot to mention the server is php 5, running CodeIgniter 1.7.2


httpcache-class.php Error Message - El Forum - 02-13-2010

[eluser]cahva[/eluser]
Im not familiar with that class but you should search for $hash_name that is used somewhere where its possibly not defined earlier. Those 2 lines dont have anything to do with the error so your narrowing was not correct Smile

The reason why it worked on other sites is that the other sites error reporting level did not include notices. But dont just turn it off, it is a bug and variables should always be defined before use.