PHP Classes

Undefined offset fix

Recommend this page to a friend!

      SimpleXML for PHP4  >  All threads  >  Undefined offset fix  >  (Un) Subscribe thread alerts  
Subject:Undefined offset fix
Summary:A fix to an issue which causes an undefined offset error
Messages:2
Author:Adam
Date:2008-07-30 10:49:14
Update:2008-08-14 10:22:33
 

  1. Undefined offset fix   Reply   Report abuse  
Picture of Adam Adam - 2008-07-30 10:49:15
Hi

Great class, really helped me out.

With my xml, the class was generating the following error:

PHP Notice: Undefined offset: 0 in /Users/Adam/Documents/Sites/Live/dhruvws/app/includes/simplexml.class.php on line 160

Changing the $array[0] part of line 160 to array_key_exists(0, $array) fixes this.

Thanks, Adam

  2. Re: Undefined offset fix   Reply   Report abuse  
Picture of Taha Paksu Taha Paksu - 2008-08-14 10:22:33 - In reply to message 1 from Adam
Thank you for that fix.