From:             [EMAIL PROTECTED]
Operating system: Linux/WinXP
PHP version:      5.2.1
PHP Bug Type:     Scripting Engine problem
Bug description:  Different error handling on different callings with E_STRICT

Description:
------------
Assume there a two classes. The first class is an abstract class which
only defines a default protected method having no parameters. The second
class (could be in same file) will extend the first class and overrides the
method from the first class using a single parameter. This will run without
any notices if i use error_reporting( E_ALL ^ E_STRICT ).

but if i will include the file within an other file, it will result in a
"Strict Standards" notice.

It does not depend on the way i call it - apache or cli.

Reproduce code:
---------------
----- FILE 1 (file1.php)-----
<?php
error_reporting( E_ALL ^ E_STRICT );
abstract class AbstractTest {
        protected function _update() {}
}

abstract class Test extends AbstractTest {
        protected function _update( $var ) {}
}
?>


------ FILE 2 (file2.php)-----
<?php
        error_reporting( E_ALL ^ E_STRICT );
        include 'file1.php';
?>

Expected result:
----------------
both ways should run in same way.

Actual result:
--------------
- calling the first example file (file1.php) directly will run fine.
- calling the second example file (file2.php), which will include the
first file, results in the following notice:
"Strict Standards: Declaration of Test::_update() should be compatible
with that of AbstractTest::_update() in \htdocs\file1.php on line 8"

-- 
Edit bug report at http://bugs.php.net/?id=40930&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40930&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40930&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40930&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40930&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40930&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40930&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40930&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40930&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40930&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40930&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40930&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40930&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40930&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40930&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40930&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40930&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40930&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40930&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40930&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40930&r=mysqlcfg

Reply via email to