getting "wrong" warnings if includes are "too" deeply nested...
| From: | Thies C. Arntzen | Date: | Thu, 04 Mar 1999 15:27:56 +0000 |
| Subject: | getting "wrong" warnings if includes are "too" deeply nested... | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-4472@lists.php.net to get a copy of this message | ||
this thing is pretty weird:
i git a script, which includes some oter stuff, which includes some
other stuff (mostly function definitions)...
i use error_reporting(-1) all the time and for some pager i get
something like (100% reproducable):
PHP 3 Warning: Uninitialized variable or array index or property (data)
in ../include/functions/DBView.fnc on line 26
whereby line 26 in DBView looks like:
function DBView_Load($query,$result = 0,$bindfields = 0)
{ // API compatibility: New code should use a referenced variable
if ($result == 0) // XXXX line 26 here
$retresult = true;
else
after some digging (renaming vars etc) i found that php is complainig
about line 85 of the same file...
if (is_string($source))
$ok = DBView_Load($source,&$src,$bind); // XXX line 85
else
now, i think it shouldn't complain about $ok not beeing inited...
BTW the code runs perfectly if i use error_reporting(7) (no uninit
warnings).... but i LIKE error_reporting(-1).
again, i got a pretty messy include chain going here, but still i feel
its a bug in the parser....
i've been trying to create a test case with no success - as my pages
heavily depend on my oracle-setup etc i cannot send an easy
test-case..... i would allow somebody to login or give more
information....
regards,
tc
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net