php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32835 Undefined variable notice not appearing...
Submitted: 2005-04-26 12:54 UTC Modified: 2005-04-26 16:30 UTC
From: jason at amp-design dot net Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5CVS-2005-04-26 (dev) OS: CentOS 4 / RHEL 3
Private report: No CVE-ID: None
 [2005-04-26 12:54 UTC] jason at amp-design dot net
Description:
------------
In the lastest CVS snapshot (8.30 GMT today), the Undefined variable notice doesn't appear when concatenating to an undefined variable. I haven't tested this with other scenarios which may also bring up this error. 

Reproduce code:
---------------
<?php
error_reporting(E_ALL);
$f .= 'fgfgf';
?>

Expected result:
----------------
Notice: Undefined variable: f

Actual result:
--------------
Nothing

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-26 13:08 UTC] tony2001@php.net
Set display_errors to On.
 [2005-04-26 15:49 UTC] jason at amp-design dot net
$p = fgfdghfgf;

where fgfdghfgf is totally undefined gives no warning or error.

I have just double checked with phpinfo() and display errors is on. However, looking at the php.ini that phpinfo() points to display_errors is set to the default value of Off. There is nothing overriding the php.ini value, so it seems like phpinfo is not displaying this value correctly.

when I turn display errors on, and restart apache, no change happens. Display errors is still on, and no errors do get displayed.

Should you want to know my command line I am using....

 Command 	 './configure' '--enable-bcmath' '--enable-exif' '--with-gettext' '--enable-calendar' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-gd=/usr/local' '--with-jpeg-dir=/usr/local' '--with-png-dir=usr/local' '--with-xml' '--with-libxml-dir=/usr/local' '--with-expat-dir=/usr/local/lib' '--with-dom=/usr/local' '--enable-ftp' '--with-mysql=/usr/local' '--enable-shared=yes' '--enable-static=yes' '--with-xsl=/usr/local' '--enable-track-vars' '--enable-sockets' '--enable-wddx' '--with-xmlrpc' '--with-zlib-dir=/usr/local/include' '--with-iconv' '--with-curl' '--enable-pcntl' '--with-curlwrappers' '--enable-wddx' '--with-xmlrpc' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-pear' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-gd-native-ttf' '--with-ttf' '--enable-debug' '--with-pgsql' '--enable-shmop' '--with-config-file-path=/etc/php.ini'

the ./configure line. Other than the changing the display errors setting, and turning log errors to off, the php.ini file remains untouched from it's default settings.
 [2005-04-26 16:30 UTC] tony2001@php.net
Most likely you have some .htaccess or entry in httpd.conf that overrides php.ini's value.
Definitely not a PHP problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 18 22:01:26 2024 UTC