Skip to content

Commit af183ec

Browse files
peter-gribanovondrejmirtes
authored andcommitted
correct return value for PHP internal functions on failure
1 parent 8390949 commit af183ec

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/Reflection/SignatureMap/functionMap.php

+14-14
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@
489489
'bzerror' => ['array', 'bz'=>'resource'],
490490
'bzerrstr' => ['string', 'bz'=>'resource'],
491491
'bzflush' => ['bool', 'bz'=>'resource'],
492-
'bzopen' => ['resource', 'file'=>'string|resource', 'mode'=>'string'],
492+
'bzopen' => ['resource|false', 'file'=>'string|resource', 'mode'=>'string'],
493493
'bzread' => ['string', 'bz'=>'resource', 'length='=>'int'],
494494
'bzwrite' => ['int', 'bz'=>'resource', 'data'=>'string', 'length='=>'int'],
495495
'CachingIterator::__construct' => ['void', 'it'=>'iterator', 'flags='=>''],
@@ -1807,7 +1807,7 @@
18071807
'dgettext' => ['string', 'domain_name'=>'string', 'msgid'=>'string'],
18081808
'dio_close' => ['void', 'fd'=>'resource'],
18091809
'dio_fcntl' => ['mixed', 'fd'=>'resource', 'cmd'=>'int', 'args='=>'mixed'],
1810-
'dio_open' => ['resource', 'filename'=>'string', 'flags'=>'int', 'mode='=>'int'],
1810+
'dio_open' => ['resource|false', 'filename'=>'string', 'flags'=>'int', 'mode='=>'int'],
18111811
'dio_read' => ['string', 'fd'=>'resource', 'len='=>'int'],
18121812
'dio_seek' => ['int', 'fd'=>'resource', 'pos'=>'int', 'whence='=>'int'],
18131813
'dio_stat' => ['array|null', 'fd'=>'resource'],
@@ -2638,7 +2638,7 @@
26382638
'exit' => ['', 'status'=>'string|int'],
26392639
'exp' => ['float', 'number'=>'float'],
26402640
'expect_expectl' => ['int', 'expect'=>'resource', 'cases'=>'array', 'match='=>'array'],
2641-
'expect_popen' => ['resource', 'command'=>'string'],
2641+
'expect_popen' => ['resource|false', 'command'=>'string'],
26422642
'explode' => ['array<int,string>|false', 'separator'=>'string', 'str'=>'string', 'limit='=>'int'],
26432643
'expm1' => ['float', 'number'=>'float'],
26442644
'extension_loaded' => ['bool', 'extension_name'=>'string'],
@@ -2650,7 +2650,7 @@
26502650
'fam_monitor_directory' => ['resource', 'fam'=>'resource', 'dirname'=>'string'],
26512651
'fam_monitor_file' => ['resource', 'fam'=>'resource', 'filename'=>'string'],
26522652
'fam_next_event' => ['array', 'fam'=>'resource'],
2653-
'fam_open' => ['resource', 'appname='=>'string'],
2653+
'fam_open' => ['resource|false', 'appname='=>'string'],
26542654
'fam_pending' => ['int', 'fam'=>'resource'],
26552655
'fam_resume_monitor' => ['bool', 'fam'=>'resource', 'fam_monitor'=>'resource'],
26562656
'fam_suspend_monitor' => ['bool', 'fam'=>'resource', 'fam_monitor'=>'resource'],
@@ -2879,7 +2879,7 @@
28792879
'fdf_get_version' => ['string', 'fdf_document='=>'resource'],
28802880
'fdf_header' => ['void'],
28812881
'fdf_next_field_name' => ['string', 'fdf_document'=>'resource', 'fieldname='=>'string'],
2882-
'fdf_open' => ['resource', 'filename'=>'string'],
2882+
'fdf_open' => ['resource|false', 'filename'=>'string'],
28832883
'fdf_open_string' => ['resource', 'fdf_data'=>'string'],
28842884
'fdf_remove_item' => ['bool', 'fdf_document'=>'resource', 'fieldname'=>'string', 'item'=>'int'],
28852885
'fdf_save' => ['bool', 'fdf_document'=>'resource', 'filename='=>'string'],
@@ -4404,7 +4404,7 @@
44044404
'ibase_blob_import' => ['string', 'link_identifier'=>'', 'file_handle'=>''],
44054405
'ibase_blob_info' => ['array', 'link_identifier'=>'', 'blob_id'=>'string'],
44064406
'ibase_blob_info\'1' => ['array', 'blob_id'=>'string'],
4407-
'ibase_blob_open' => ['resource', 'link_identifier'=>'', 'blob_id'=>'string'],
4407+
'ibase_blob_open' => ['resource|false', 'link_identifier'=>'', 'blob_id'=>'string'],
44084408
'ibase_blob_open\'1' => ['resource', 'blob_id'=>'string'],
44094409
'ibase_close' => ['bool', 'link_identifier='=>'resource'],
44104410
'ibase_commit' => ['bool', 'link_identifier='=>'resource'],
@@ -6398,7 +6398,7 @@
63986398
'mcrypt_module_is_block_algorithm' => ['bool', 'algorithm'=>'string', 'lib_dir='=>'string'],
63996399
'mcrypt_module_is_block_algorithm_mode' => ['bool', 'mode'=>'string', 'lib_dir='=>'string'],
64006400
'mcrypt_module_is_block_mode' => ['bool', 'mode'=>'string', 'lib_dir='=>'string'],
6401-
'mcrypt_module_open' => ['resource', 'cipher'=>'string', 'cipher_directory'=>'string', 'mode'=>'string', 'mode_directory'=>'string'],
6401+
'mcrypt_module_open' => ['resource|false', 'cipher'=>'string', 'cipher_directory'=>'string', 'mode'=>'string', 'mode_directory'=>'string'],
64026402
'mcrypt_module_self_test' => ['bool', 'algorithm'=>'string', 'lib_dir='=>'string'],
64036403
'mcrypt_ofb' => ['string', 'cipher'=>'string', 'key'=>'string', 'data'=>'string', 'mode'=>'int', 'iv='=>'string'],
64046404
'md5' => ['string', 'str'=>'string', 'raw_output='=>'bool'],
@@ -8061,7 +8061,7 @@
80618061
'openal_context_process' => ['bool', 'context'=>'resource'],
80628062
'openal_context_suspend' => ['bool', 'context'=>'resource'],
80638063
'openal_device_close' => ['bool', 'device'=>'resource'],
8064-
'openal_device_open' => ['resource', 'device_desc='=>'string'],
8064+
'openal_device_open' => ['resource|false', 'device_desc='=>'string'],
80658065
'openal_listener_get' => ['mixed', 'property'=>'int'],
80668066
'openal_listener_set' => ['bool', 'property'=>'int', 'setting'=>'mixed'],
80678067
'openal_source_create' => ['resource'],
@@ -8497,7 +8497,7 @@
84978497
'PDOStatement::setFetchMode\'1' => ['bool', 'fetch_column'=>'int', 'colno'=>'int'],
84988498
'PDOStatement::setFetchMode\'2' => ['bool', 'fetch_class'=>'int', 'classname'=>'string', 'ctorargs'=>'array'],
84998499
'PDOStatement::setFetchMode\'3' => ['bool', 'fetch_into'=>'int', 'object'=>'object'],
8500-
'pfsockopen' => ['resource', 'hostname'=>'string', 'port='=>'int', '&w_errno='=>'int', '&w_errstr='=>'string', 'timeout='=>'float'],
8500+
'pfsockopen' => ['resource|false', 'hostname'=>'string', 'port='=>'int', '&w_errno='=>'int', '&w_errstr='=>'string', 'timeout='=>'float'],
85018501
'pg_affected_rows' => ['int', 'result'=>'resource'],
85028502
'pg_cancel_query' => ['bool', 'connection'=>'resource'],
85038503
'pg_client_encoding' => ['string', 'connection='=>'resource'],
@@ -9032,9 +9032,9 @@
90329032
'quoted_printable_encode' => ['string', 'str'=>'string'],
90339033
'quotemeta' => ['string', 'str'=>'string'],
90349034
'rad2deg' => ['float', 'number'=>'float'],
9035-
'radius_acct_open' => ['resource'],
9035+
'radius_acct_open' => ['resource|false'],
90369036
'radius_add_server' => ['bool', 'radius_handle'=>'resource', 'hostname'=>'string', 'port'=>'int', 'secret'=>'string', 'timeout'=>'int', 'max_tries'=>'int'],
9037-
'radius_auth_open' => ['resource'],
9037+
'radius_auth_open' => ['resource|false'],
90389038
'radius_close' => ['bool', 'radius_handle'=>'resource'],
90399039
'radius_config' => ['bool', 'radius_handle'=>'resource', 'file'=>'string'],
90409040
'radius_create_request' => ['bool', 'radius_handle'=>'resource', 'type'=>'int'],
@@ -9898,7 +9898,7 @@
98989898
'rpm_close' => ['bool', 'rpmr'=>'resource'],
98999899
'rpm_get_tag' => ['mixed', 'rpmr'=>'resource', 'tagnum'=>'int'],
99009900
'rpm_is_valid' => ['bool', 'filename'=>'string'],
9901-
'rpm_open' => ['resource', 'filename'=>'string'],
9901+
'rpm_open' => ['resource|false', 'filename'=>'string'],
99029902
'rpm_version' => ['string'],
99039903
'rrd_create' => ['bool', 'filename'=>'string', 'options'=>'array'],
99049904
'rrd_error' => ['string'],
@@ -11465,8 +11465,8 @@
1146511465
'sqlite_next' => ['bool', 'result'=>''],
1146611466
'sqlite_num_fields' => ['int', 'result'=>''],
1146711467
'sqlite_num_rows' => ['int', 'result'=>''],
11468-
'sqlite_open' => ['resource', 'filename'=>'string', 'mode='=>'int', 'error_message='=>'string'],
11469-
'sqlite_popen' => ['resource', 'filename'=>'string', 'mode='=>'int', 'error_message='=>'string'],
11468+
'sqlite_open' => ['resource|false', 'filename'=>'string', 'mode='=>'int', 'error_message='=>'string'],
11469+
'sqlite_popen' => ['resource|false', 'filename'=>'string', 'mode='=>'int', 'error_message='=>'string'],
1147011470
'sqlite_prev' => ['bool', 'result'=>''],
1147111471
'sqlite_query' => ['SQLiteResult', 'dbhandle'=>'', 'query'=>'string', 'result_type='=>'int', 'error_msg='=>'string'],
1147211472
'sqlite_rewind' => ['bool', 'result'=>''],

0 commit comments

Comments
 (0)