Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Zend/tests/inheritance/argument_restriction_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ class Sub extends Base {
}
?>
--EXPECTF--
Fatal error: Declaration of & Sub::test() must be compatible with & Base::test($foo, array $bar, $option = null, $extra = 'llllllllll...') in %s on line %d
Fatal error: Declaration of &Sub::test() must be compatible with &Base::test($foo, array $bar, $option = null, $extra = 'llllllllll...') in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/objects/objects_005.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ class test3 extends test {

?>
--EXPECTF--
Fatal error: Declaration of test3::foo() must be compatible with & test::foo() in %s on line %d
Fatal error: Declaration of test3::foo() must be compatible with &test::foo() in %s on line %d
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ class A implements I {

?>
--EXPECTF--
Fatal error: Declaration of A::$prop::get() must be compatible with & I::$prop::get() in %s on line %d
Fatal error: Declaration of A::$prop::get() must be compatible with &I::$prop::get() in %s on line %d
2 changes: 1 addition & 1 deletion Zend/zend_inheritance.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ static ZEND_COLD zend_string *zend_get_function_declaration(
smart_str str = {0};

if (fptr->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) {
smart_str_appends(&str, "& ");
smart_str_appendc(&str, '&');
}

if (fptr->common.scope) {
Expand Down
2 changes: 1 addition & 1 deletion ext/pdo/pdo_dbh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ bool pdo_hash_methods(pdo_dbh_object_t *dbh_obj, int kind)
func.type = ZEND_INTERNAL_FUNCTION;
func.handler = funcs->handler;
func.function_name = zend_string_init(funcs->fname, strlen(funcs->fname), dbh->is_persistent);
func.scope = dbh_obj->std.ce;
func.scope = pdo_dbh_ce;
func.prototype = NULL;
ZEND_MAP_PTR(func.run_time_cache) = rt_cache_size ? pecalloc(rt_cache_size, 1, dbh->is_persistent) : NULL;
func.T = ZEND_OBSERVER_ENABLED;
Expand Down
25 changes: 25 additions & 0 deletions ext/pdo_sqlite/tests/gh20095.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--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