Bug #52098 [Ana->Csd]: Own PDOStatement implementation ignore __call()

From: Date: Mon, 21 Mar 2016 14:52:15 +0000
Subject: Bug #52098 [Ana->Csd]: Own PDOStatement implementation ignore __call()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-199995@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=52098&edit=1

 ID:                 52098
 Updated by:         jpauli@php.net
 Reported by:        jpauli@php.net
 Summary:            Own PDOStatement implementation ignore __call()
-Status:             Analyzed
+Status:             Closed
 Type:               Bug
 Package:            PDO Core
 Operating System:   *nix & Win
 PHP Version:        5.3.2
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of jpauli
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d3d64b7c62cb7b63d854b1cbc6a032c4995cdba8
Log: Reworked Fix bug #52098


Previous Comments:
------------------------------------------------------------------------
[2010-10-02 03:21:44] felipe@php.net

I just fixed the SIGSEGV.

------------------------------------------------------------------------
[2010-09-30 17:58:11] jpauli@php.net

Has the patch been merged to 5.3.3 ?
I'm still experiencing the bug on 5.3.3, please think about merging it to the right branch for
the next release.
Test would be great as well, I can manage that if you want.

------------------------------------------------------------------------
[2010-06-17 01:33:02] felipe@php.net

Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=300504
Log: - New tests related to #52098

------------------------------------------------------------------------
[2010-06-17 01:29:39] felipe@php.net

I've committed a fix for the crash:
http://svn.php.net/viewvc?view=revision&revision=300503

------------------------------------------------------------------------
[2010-06-17 01:09:56] felipe@php.net

I can reproduce it with another test case:

<?php

class MyStatement extends PDOStatement
{
}

$obj = new MyStatement;
var_dump($obj->foo());


Adding the support to __call lead to a strange behavior for classes that inherits PDOStatement. As
it must be check if the called method is a user method or an driver method (which isn't stored
in function_table) - that's when the instance is created by PDO object.
If we introduce __call check, it must be done after the driver method checking... which will behave
diferently when the instance is created by PDO or not...

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=52098


--
Edit this bug report at https://bugs.php.net/bug.php?id=52098&edit=1


Thread (8 messages)

« previous php.bugs (#199995) next »