#32370 [NEW]: Object Constants
| From: | codebowl at gmail dot com | Date: | Fri, 18 Mar 2005 23:57:02 +0000 |
| Subject: | #32370 [NEW]: Object Constants | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-76702@lists.php.net to get a copy of this message | ||
From: codebowl at gmail dot com
Operating system: Windows XP Pro SP 2
PHP version: 5.0.3
PHP Bug Type: Class/Object related
Bug description: Object Constants
Description:
------------
I have 2 class files, one that extends the built in Exceptions class and
one that extends this class
Built In Exceptions
|
|
+- SvEx Class
|
|
+- ApplicationEx Class
The problem lies in class constants.
The SvEx class and Application Class both have thier own constants named
ERR_TYPE and ERR_DESC for some reason when i throw an ApplicationEx
Exception it is using the constants from the SvEx Exception class.
Reproduce code:
---------------
You can see the code files here
http://codebowl.dontexist.net/source/ScEx.phps
http://codebowl.dontexist.net/source/Application.phps
http://codebowl.dontexist.net/source/Trigger.phps
Expected result:
----------------
I would expect that it would set the $this->_error['type'] and ['desc']
with the appropriate constant values. When i throw an ApplicationEx it
should use the ApplicationEx::ERR_TYPE etc..
Everything else set's properly such as the error message blah blah, you
can see an example of the results here
http://codebowl.dontexist.net/clients/JVMedia/SimonVolkov/global.php
Actual result:
--------------
For some reason it is setting them to the values in the SvEx Exception
Class
--
Edit bug report at http://bugs.php.net/?id=32370&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32370&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32370&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32370&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32370&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32370&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32370&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32370&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32370&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32370&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32370&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=32370&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=32370&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32370&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32370&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32370&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32370&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32370&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32370&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32370&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32370&r=mysqlcfg