|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-04-26 19:18 UTC] jan at horde dot org
This one is a very strange one. It seems like some constants are getting undefined if you set the locale to tr_TR. It happens randomly with internally defined and user defined constants and is reproducable with this little script:
<?php
setlocale(LC_ALL, 'tr_TR');
echo extension_loaded('imap');
echo SORTARRIVAL;
?>
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 09:00:01 2025 UTC |
This bug can be resolved by applying the patch below to zend_constants.c --- zend_constants.c_old Sat Jun 8 15:58:01 2002 +++ zend_constants.c Sat Jun 8 15:58:09 2002 @@ -226,8 +226,6 @@ lookup_name = do_alloca(name_len+1); memcpy(lookup_name, name, name_len+1); - zend_str_tolower(lookup_name, name_len); - if (zend_hash_find(EG(zend_constants), lookup_name, name_len+1, (void **) &c)==SUCCESS) { if ((c->flags & CONST_CS) && memcmp(c->name, name, name_len)!=0) { retval=0; @@ -255,7 +253,6 @@ printf("Registering constant for module %d\n", c->module_number); #endif - zend_str_tolower(lowercase_name, c->name_len); if (zend_hash_add(EG(zend_constants), lowercase_name, c->name_len, (void *) c, sizeof(zend_constant), NULL)==FAILURE) { free(c->name); if (!(c->flags & CONST_PERSIST