diff --git a/Lib/php/director.swg b/Lib/php/director.swg index 50b433e47..6671f5580 100644 --- a/Lib/php/director.swg +++ b/Lib/php/director.swg @@ -102,12 +102,11 @@ namespace Swig { TSRMLS_FETCH_FROM_CTX(swig_zts_ctx); zend_class_entry **ce; zend_function *mptr; - int name_len = strlen(lc_fname); if (zend_lookup_class(cname, strlen(cname), &ce TSRMLS_CC) != SUCCESS) { return false; } - if (zend_hash_find(&(*ce)->function_table, lc_fname, name_len + 1, (void **) &mptr) != SUCCESS) { + if (zend_hash_find(&(*ce)->function_table, lc_fname, strlen(lc_fname) + 1, (void **) &mptr) != SUCCESS) { return false; } // common.scope points to the declaring class