Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54244 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58919 invoked from network); 29 Jul 2011 03:37:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jul 2011 03:37:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.42 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.212.42 mail-vw0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:40648] helo=mail-vw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A8/22-35879-31B223E4 for ; Thu, 28 Jul 2011 23:37:55 -0400 Received: by vwl1 with SMTP id 1so2785303vwl.29 for ; Thu, 28 Jul 2011 20:37:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=29Kd9ckWA/u+yT8i+drCV8lPe8natSnqR7ho49cHxNA=; b=OLG7QbB2zLX7WRETzj0UBcaaGf1btydtVLLO0LWQkmIHzaHxYnH0596788g7qpLqxS GSwk0g/IXV7uPnLw5I1jRqLObzJMD/RCN6STG/itCLYKJrXa94GTy9el4vmoVgdp5/lf qPjpxPGVTtAf9ZIY/9Qw52FxHQSVUyLiMeAu8= MIME-Version: 1.0 Received: by 10.221.13.2 with SMTP id pk2mr206512vcb.165.1311910671668; Thu, 28 Jul 2011 20:37:51 -0700 (PDT) Sender: laruence@gmail.com Received: by 10.220.161.130 with HTTP; Thu, 28 Jul 2011 20:37:51 -0700 (PDT) Date: Fri, 29 Jul 2011 11:37:51 +0800 X-Google-Sender-Auth: L4LTJKJn8SJbUFegQKhZwaNk0Dc Message-ID: To: PHP Internals Cc: Felipe Pena , Pierre Joye , =?UTF-8?Q?Johannes_Schl=C3=BCter?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Bug #55311] Static methods invoke __call when called from within class From: laruence@php.net (Laruence) Hi: about #55311.https://bugs.php.net/bug.php?id=3D55311 I found it maybe for some reason, that somebody change the if/elseif sequence to make this bug. but I am not sure about why he do this, so I refer to maillist, any = idea? Index: Zend/zend_object_handlers.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- Zend/zend_object_handlers.c (revision 313905) +++ Zend/zend_object_handlers.c (working copy) @@ -988,13 +988,13 @@ if (!fbc && zend_hash_find(&ce->function_table, lc_function_name, function_name_strlen+1, (void **) &fbc)=3D=3DFAILURE) { efree(lc_function_name); - if (ce->__call && + if (ce->__callstatic) { + return zend_get_user_callstatic_function(ce, function_name_strval, function_name_strlen); + } else if (ce->__call && EG(This) && Z_OBJ_HT_P(EG(This))->get_class_entry && instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) { return zend_get_user_call_function(ce, function_name_strval, function_name_strlen); - } else if (ce->__callstatic) { - return zend_get_user_callstatic_function(ce, function_name_strval, function_name_strlen); } else { return NULL; } --=20 Laruence =C2=A0Xinchen Hui http://www.laruence.com/