]> granicus.if.org Git - php/commitdiff
Migrate finfo away from legacy ctor
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 29 Jan 2019 12:03:47 +0000 (13:03 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 29 Jan 2019 12:04:20 +0000 (13:04 +0100)
ext/fileinfo/fileinfo.c
ext/fileinfo/tests/bug61173.phpt
ext/fileinfo/tests/finfo_open_002.phpt
ext/fileinfo/tests/finfo_open_error.phpt

index 749955a3c4762b5e5cb77870d72bb7a5048fc68e..a8c71259f7da80f006572f7cfabaac0193dc2701 100644 (file)
@@ -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)
index 9fbf48b2ecb958f9e3c53304922bb8d9dbb004a2..6487e15bbbb3fbe22b5d5bfe6b7e2edfd63800bc 100644 (file)
@@ -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
index 744773b550106897a8bc258674cbcbd972fed254..ca997a5f640f0b2dba3cb71d81c921a783dd55cf 100644 (file)
@@ -6,7 +6,7 @@ FileInfo - Calling the constructor twice
 <?php
 
 $x = new finfo;
-$x->finfo();
+$x->__construct();
 
 echo "done!\n";
 
index 15202e5799c1033785d45de2b562156335bca615..6a0ef96a4e49b8ff4b2a90eeb887b15c3f23d459 100644 (file)
@@ -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===