From bc757c0480aeb49d21b040344ef62b643f33dcee Mon Sep 17 00:00:00 2001 From: "Gopianth v (aka) Bluepie" Date: Tue, 28 May 2019 16:53:14 +0530 Subject: [PATCH] added split to depricated functions. This function was actually DEPRECATED in PHP 5.3.0. You can see the deprecated function list containing split in https://www.php.net/manual/en/migration53.deprecated.php under Migrating from PHP 5.2.x to PHP 5.3.x, but the function was "only" removed from php 7.0, Migration guide of phpmanual(5.6.x to 7.0.x) does not include this for some reason. --- classes/tests/critical.php | 2 +- testcases.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/tests/critical.php b/classes/tests/critical.php index 95e9c2e..56be134 100644 --- a/classes/tests/critical.php +++ b/classes/tests/critical.php @@ -112,7 +112,7 @@ public function _reservedNames($line) { * @return boolean Line matches test. */ public function _deprecatedFunctions($line) { - $regex = "#(?:mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mcrypt_generic_end|mcrypt_ecb|mcrypt_cbc|mcrypt_cfb|mcrypt_ofb|set_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking)\(#i"; + $regex = "#(?:mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mcrypt_generic_end|mcrypt_ecb|mcrypt_cbc|mcrypt_cfb|mcrypt_ofb|set_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|\ssplit)\(#i"; if (preg_match($regex, $line)) { return true; } diff --git a/testcases.php b/testcases.php index ba7c478..d778c9f 100644 --- a/testcases.php +++ b/testcases.php @@ -122,6 +122,7 @@ trait numeric { /*...*/ } mysql_tablename(); mysql_thread_id(); mysql_unbuffered_query(); +split(); // New objects cannot be assigned by reference class C {}