Re: Undefined index....
| From: | Serge Fonville | Date: | Fri, 15 Mar 2013 13:14:12 +0000 |
| Subject: | Re: Undefined index.... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-320570@lists.php.net to get a copy of this message | ||
Hi,
Two questions:
Where is $xml defined and where is $pos defined?
HTH
Kind regards/met vriendelijke groet,
Serge Fonville
http://www.sergefonville.nl
Convince Microsoft!
They need to add TRUNCATE PARTITION in SQL Server
https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table
2013/3/15 Jay Blanchard <jay.blanchard@sigmaphinothing.org>
> I have inherited a mess of a home-grown PHP framework that literally fills
> the error_log with 100's of thousands of messages each day. First order of
> business was rotating the logs, now we are working through each error to
> solve them. This is a fairly basic error, but I for the life of me cannot
> remember what the solution is.
>
> I have a recursive function that reads from XML files and replaces xi:
> include directives. It looks like this -
>
> function includeXML($file, $locale, $url, $level = 1) {
> // stuff
> while(($line = fgets($fp)) !== false) {
> if($pos === false) {
> $xml .= $line;
> } else {
> includeXML('repository/' . $included, $locale, (int)$level +
> $pos - 1);
> }
> }
> }
>
> Why do I get the notice that $xml is an undefined index? I do not want to
> suppress the notice, I just want to take care of it properly. I attempted
> setting $xml within the function but then the whole function fails for some
> reason in the depths of this hideous framework. Can anyone provide any
> insight? TVMIA!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>