1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 03:03:26 +02:00
Files
Tim Düsterhus 1cb166cbbb pdo: Fix scope for PDO mixins in pdo_hash_methods() (#20200)
From what I see the incorrect scope is not observable in any other way. The
mixin methods are completely invisible to Reflection and a SQLite function
referring to a private method is still properly called as before.

Fixes php/php-src#20095.
2025-10-19 14:13:54 +02:00

26 lines
520 B
PHP

--TEST--
GH-20095: Incorrect class name in deprecation message for PDO mixins
--EXTENSIONS--
pdo_sqlite
--FILE--
<?php
class Foo extends PDO {
private function test() {
echo "foo";
}
public function register() {
$this->sqliteCreateFunction('my_test', [$this, "test"]);
}
}
$pdo = new Foo('sqlite::memory:');
$pdo->register();
$pdo->query("SELECT my_test()");
?>
--EXPECTF--
Deprecated: Method PDO::sqliteCreateFunction() is deprecated since 8.5, use Pdo\Sqlite::createFunction() instead in %s on line %d
foo