summaryrefslogtreecommitdiff
path: root/zend/exists.cpp
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-07-26 15:21:33 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-07-26 15:21:33 +0200
commit8e089ea9174ca133f938bdb16ef14e7a1027ccaf (patch)
tree28116cf52af932ef3783f66bc346b0b719926adb /zend/exists.cpp
parentfe19521099b620869c5dbbe64b2ddf9aeddcbe51 (diff)
compile issues
Diffstat (limited to 'zend/exists.cpp')
-rw-r--r--zend/exists.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/zend/exists.cpp b/zend/exists.cpp
index 6bab8ba..b5bc64f 100644
--- a/zend/exists.cpp
+++ b/zend/exists.cpp
@@ -44,10 +44,10 @@ bool class_exists(const char *classname, size_t len, bool autoload)
std::unique_ptr<char[]> lc_name(new char[len + 1]);
// copy the name to lowercase, but ignore the starting slash (if there is one)
- zend_str_tolower_copy(lc_name, classname, len);
+ zend_str_tolower_copy(lc_name.get(), classname, len);
// see if there is a class with this name
- if (SUCCESS != zend_hash_find(EG(class_table), name, len + 1, (void **) &ce)) return false;
+ if (SUCCESS != zend_hash_find(EG(class_table), lc_name.get(), len + 1, (void **) &ce)) return false;
// the found "class" could also be an interface or trait, which we do no want
return !(((*ce)->ce_flags & (ZEND_ACC_INTERFACE | ZEND_ACC_TRAIT)) > ZEND_ACC_EXPLICIT_ABSTRACT_CLASS);
@@ -55,7 +55,7 @@ bool class_exists(const char *classname, size_t len, bool autoload)
else
{
// no auto-load
- if (SUCCESS != zend_lookup_class(str, len, &ce TSRMLS_CC) == SUCCESS) return false;
+ if (SUCCESS != zend_lookup_class(classname, len, &ce TSRMLS_CC)) return false;
// the found "class" could also be an interface or trait, which we do no want
return ((*ce)->ce_flags & (ZEND_ACC_INTERFACE | (ZEND_ACC_TRAIT - ZEND_ACC_EXPLICIT_ABSTRACT_CLASS))) == 0;