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