File tree Expand file tree Collapse file tree 4 files changed +9
-2
lines changed Expand file tree Collapse file tree 4 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,11 @@ PHP 8.1 UPGRADE NOTES
75
75
internally previously.
76
76
. The MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH option no longer has an effect.
77
77
. The MYSQLI_STORE_RESULT_COPY_DATA option no longer has an effect.
78
+ . The default error handling mode has been changed from "silent" to
79
+ "exceptions". See https://www.php.net/manual/en/mysqli-driver.report-mode.php
80
+ for details of behavior changes and how to explicitly set this attribute. To
81
+ keep the old behavior, use mysqli_report(MYSQLI_REPORT_OFF);
82
+ RFC: https://wiki.php.net/rfc/mysqli_default_errmode
78
83
79
84
- MySQLnd:
80
85
. The mysqlnd.fetch_copy_data ini setting has been removed. However, this
Original file line number Diff line number Diff line change @@ -521,7 +521,7 @@ static PHP_GINIT_FUNCTION(mysqli)
521
521
mysqli_globals -> default_pw = NULL ;
522
522
mysqli_globals -> default_socket = NULL ;
523
523
mysqli_globals -> reconnect = 0 ;
524
- mysqli_globals -> report_mode = 0 ;
524
+ mysqli_globals -> report_mode = MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT ; ;
525
525
mysqli_globals -> allow_local_infile = 0 ;
526
526
mysqli_globals -> local_infile_directory = NULL ;
527
527
mysqli_globals -> rollback_on_cached_plink = FALSE;
@@ -826,7 +826,7 @@ PHP_RINIT_FUNCTION(mysqli)
826
826
#endif
827
827
MyG (error_msg ) = NULL ;
828
828
MyG (error_no ) = 0 ;
829
- MyG (report_mode ) = 0 ;
829
+ MyG (report_mode ) = MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT ;
830
830
831
831
return SUCCESS ;
832
832
}
Original file line number Diff line number Diff line change 7
7
*/
8
8
9
9
$ driver = new mysqli_driver ;
10
+ $ driver ->report_mode = MYSQLI_REPORT_OFF ;
10
11
11
12
$ host = getenv ("MYSQL_TEST_HOST " ) ?: "127.0.0.1 " ;
12
13
$ port = getenv ("MYSQL_TEST_PORT " ) ?: 3306 ;
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ require_once('skipif.inc');
7
7
--FILE--
8
8
<?php
9
9
10
+ mysqli_report (MYSQLI_REPORT_OFF );
10
11
$ mysqli = new mysqli ();
11
12
@$ mysqli ->__construct ('doesnotexist ' );
12
13
$ mysqli ->close ();
You can’t perform that action at this time.
0 commit comments