Skip to content

Commit 4d8dc2b

Browse files
committed
Migrate finfo away from legacy ctor
1 parent 371e427 commit 4d8dc2b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

ext/fileinfo/fileinfo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ ZEND_END_ARG_INFO()
161161
/* {{{ finfo_class_functions
162162
*/
163163
static const zend_function_entry finfo_class_functions[] = {
164-
ZEND_ME_MAPPING(finfo, finfo_open, arginfo_finfo_open, ZEND_ACC_PUBLIC)
164+
ZEND_ME_MAPPING(__construct, finfo_open, arginfo_finfo_open, ZEND_ACC_PUBLIC)
165165
ZEND_ME_MAPPING(set_flags, finfo_set_flags,arginfo_finfo_method_set_flags, ZEND_ACC_PUBLIC)
166166
ZEND_ME_MAPPING(file, finfo_file, arginfo_finfo_method_file, ZEND_ACC_PUBLIC)
167167
ZEND_ME_MAPPING(buffer, finfo_buffer, arginfo_finfo_method_buffer, ZEND_ACC_PUBLIC)

ext/fileinfo/tests/bug61173.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ try {
1414
echo $e->getMessage(), "\n";
1515
}
1616
--EXPECT--
17-
finfo::finfo() expects at most 2 parameters, 3 given
17+
finfo::__construct() expects at most 2 parameters, 3 given

ext/fileinfo/tests/finfo_open_002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FileInfo - Calling the constructor twice
66
<?php
77

88
$x = new finfo;
9-
$x->finfo();
9+
$x->__construct();
1010

1111
echo "done!\n";
1212

ext/fileinfo/tests/finfo_open_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ resource(6) of type (file_info)
4949

5050
Warning: finfo_open() expects parameter 1 to be int, string given in %sfinfo_open_error.php on line 16
5151
bool(false)
52-
finfo::finfo() expects parameter 1 to be int, string given
52+
finfo::__construct() expects parameter 1 to be int, string given
5353
===DONE===

0 commit comments

Comments
 (0)