]> granicus.if.org Git - php/commitdiff
Fixed bug #43703 (Signature compatibility check broken)
authorDmitry Stogov <dmitry@php.net>
Wed, 9 Jan 2008 07:57:42 +0000 (07:57 +0000)
committerDmitry Stogov <dmitry@php.net>
Wed, 9 Jan 2008 07:57:42 +0000 (07:57 +0000)
Zend/tests/bug43703.phpt [new file with mode: 0644]
Zend/zend_compile.c

diff --git a/Zend/tests/bug43703.phpt b/Zend/tests/bug43703.phpt
new file mode 100644 (file)
index 0000000..de4f8a8
--- /dev/null
@@ -0,0 +1,23 @@
+--TEST--
+Bug #43703 (Signature compatibility check broken)
+--FILE--
+<?php
+class JoinPoint
+{
+}
+
+abstract class Pointcut
+{
+    abstract public function evaluate(JoinPoint $joinPoint);
+}
+
+class Read extends Pointcut
+{
+    public function evaluate(Joinpoint $joinPoint)
+    {
+    }
+}
+?>
+DONE
+--EXPECT--
+DONE
index 4894e2639f0c189c859a9c4b0349100039f361a0..c5d061ede33aec59f1e8a3430d2f1b717c08ad32 100644 (file)
@@ -2293,13 +2293,13 @@ static zend_bool zend_do_perform_implementation_check(zend_function *fe, zend_fu
                        return 0;
                }
                if (fe->common.arg_info[i].class_name
-                       && strcmp(fe->common.arg_info[i].class_name, proto->common.arg_info[i].class_name)!=0) {
+                       && strcasecmp(fe->common.arg_info[i].class_name, proto->common.arg_info[i].class_name)!=0) {
                        char *colon;
 
                        if (fe->common.type == ZEND_USER_FUNCTION &&
                            strchr(proto->common.arg_info[i].class_name, ':') == NULL &&
                            (colon = zend_memrchr(fe->common.arg_info[i].class_name, ':', fe->common.arg_info[i].class_name_len)) != NULL &&
-                           strcmp(colon+1, proto->common.arg_info[i].class_name) == 0) {
+                           strcasecmp(colon+1, proto->common.arg_info[i].class_name) == 0) {
                                efree((char*)fe->common.arg_info[i].class_name);
                                fe->common.arg_info[i].class_name = estrndup(proto->common.arg_info[i].class_name, proto->common.arg_info[i].class_name_len);
                                fe->common.arg_info[i].class_name_len = proto->common.arg_info[i].class_name_len;