summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2005-12-16 23:58:38 +0000
committerMarcus Boerger <helly@php.net>2005-12-16 23:58:38 +0000
commit70a53e10c6bc2acb5a88523b3cce07374b2b576c (patch)
treeb9af4d9b3e6d6f0819d8eeaf6248bca7c4d4866e
parente6ae0e99c3dd0ec2d22815e125a1a54d5ae8d684 (diff)
downloadphp-git-70a53e10c6bc2acb5a88523b3cce07374b2b576c.tar.gz
- Simplify (+fix memleak)
-rwxr-xr-xext/spl/php_spl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c
index e1cf0d0a2c..cb8241034d 100755
--- a/ext/spl/php_spl.c
+++ b/ext/spl/php_spl.c
@@ -393,9 +393,7 @@ PHP_FUNCTION(spl_autoload_register)
if (ZEND_NUM_ARGS()) {
if (Z_TYPE_P(zcallable) == IS_STRING) {
if (Z_STRLEN_P(zcallable) == sizeof("spl_autoload_call") - 1) {
- char tmp_name[sizeof("spl_autoload_call")];
- zend_str_tolower_copy(tmp_name, Z_STRVAL_P(zcallable), Z_STRLEN_P(zcallable));
- if (!strcmp(tmp_name, "spl_autoload_call")) {
+ if (!zend_binary_strcasecmp(Z_STRVAL_P(zcallable), sizeof("spl_autoload_call"), "spl_autoload_call", sizeof("spl_autoload_call"))) {
if (do_throw) {
zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function spl_autoload_call() cannot be registered");
}