From 4d8dc2b05e7126bfcd5b639ca632906f96d5ff65 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 29 Jan 2019 13:03:47 +0100 Subject: [PATCH] Migrate finfo away from legacy ctor --- ext/fileinfo/fileinfo.c | 2 +- ext/fileinfo/tests/bug61173.phpt | 2 +- ext/fileinfo/tests/finfo_open_002.phpt | 2 +- ext/fileinfo/tests/finfo_open_error.phpt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c index 749955a3c4..a8c71259f7 100644 --- a/ext/fileinfo/fileinfo.c +++ b/ext/fileinfo/fileinfo.c @@ -161,7 +161,7 @@ ZEND_END_ARG_INFO() /* {{{ finfo_class_functions */ static const zend_function_entry finfo_class_functions[] = { - ZEND_ME_MAPPING(finfo, finfo_open, arginfo_finfo_open, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(__construct, finfo_open, arginfo_finfo_open, ZEND_ACC_PUBLIC) ZEND_ME_MAPPING(set_flags, finfo_set_flags,arginfo_finfo_method_set_flags, ZEND_ACC_PUBLIC) ZEND_ME_MAPPING(file, finfo_file, arginfo_finfo_method_file, ZEND_ACC_PUBLIC) ZEND_ME_MAPPING(buffer, finfo_buffer, arginfo_finfo_method_buffer, ZEND_ACC_PUBLIC) diff --git a/ext/fileinfo/tests/bug61173.phpt b/ext/fileinfo/tests/bug61173.phpt index 9fbf48b2ec..6487e15bbb 100644 --- a/ext/fileinfo/tests/bug61173.phpt +++ b/ext/fileinfo/tests/bug61173.phpt @@ -14,4 +14,4 @@ try { echo $e->getMessage(), "\n"; } --EXPECT-- -finfo::finfo() expects at most 2 parameters, 3 given +finfo::__construct() expects at most 2 parameters, 3 given diff --git a/ext/fileinfo/tests/finfo_open_002.phpt b/ext/fileinfo/tests/finfo_open_002.phpt index 744773b550..ca997a5f64 100644 --- a/ext/fileinfo/tests/finfo_open_002.phpt +++ b/ext/fileinfo/tests/finfo_open_002.phpt @@ -6,7 +6,7 @@ FileInfo - Calling the constructor twice finfo(); +$x->__construct(); echo "done!\n"; diff --git a/ext/fileinfo/tests/finfo_open_error.phpt b/ext/fileinfo/tests/finfo_open_error.phpt index 15202e5799..6a0ef96a4e 100644 --- a/ext/fileinfo/tests/finfo_open_error.phpt +++ b/ext/fileinfo/tests/finfo_open_error.phpt @@ -49,5 +49,5 @@ resource(6) of type (file_info) Warning: finfo_open() expects parameter 1 to be int, string given in %sfinfo_open_error.php on line 16 bool(false) -finfo::finfo() expects parameter 1 to be int, string given +finfo::__construct() expects parameter 1 to be int, string given ===DONE=== -- 2.50.1