From: eddie at omegaware dot com
Operating system:
PHP version: 4.3.2
PHP Bug Type: *Compile Issues
Bug description: disp_invokeex won't work with multiple args.
Is there any reason why the REGISTER_*_CONSTANT macros (ie
REGISTER_LONG_CONSTANT) use sizeof instead of strlen for calculating the
length of the constant name? I am running into problems which resort to me
having to not use this macros to define functions but to use the raw
zend_register_*_constant function..
example.
using the macro with a literal string for the name works fine.
REGISTER_LONG_CONSTANT("MYCONSTANT",4567,CONST_CS|CONST_PERISISTENT);
however using the macro with a char * variable does not.
char *name = "MYCONSTANT";
REGISTER_LONG_CONSTANT(name,4567,CONST_CS|CONST_PERSISTENT);
The later results with the name_len variable to zend_register_long_contant
being 4, the size of the char *.
This has caused me problems when I was trying to register a char* array of
constants.
--
Edit bug report at http://bugs.php.net/?id=23943&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23943&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23943&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23943&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23943&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23943&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23943&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23943&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23943&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23943&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23943&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23943&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23943&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23943&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23943&r=gnused