Procházet zdrojové kódy

[php] exclude E_DEPRECATED from error reporting (#10502)

Aleksandr Kuzmenko před 3 roky
rodič
revize
8e48b09892
2 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 1 0
      extra/CHANGES.txt
  2. 1 1
      std/php/Boot.hx

+ 1 - 0
extra/CHANGES.txt

@@ -4,6 +4,7 @@
 
 	all : fixed compiler crash in complex constraints chains (#10445)
 	js : fixed constructors with rest arguments when compiling for ES3, ES5 (#10490)
+	php : excluded E_DEPRECATED notices from error reporting (#10502)
 	nullsafety : fixed false error on extern var fields without initialization (#10448)
 
 2021-10-22 4.2.4:

+ 1 - 1
std/php/Boot.hx

@@ -59,7 +59,7 @@ class Boot {
 	static function __init__() {
 		Global.mb_internal_encoding('UTF-8');
 		if (!Global.defined('HAXE_CUSTOM_ERROR_HANDLER') || !Const.HAXE_CUSTOM_ERROR_HANDLER) {
-			var previousLevel = Global.error_reporting(Const.E_ALL);
+			var previousLevel = Global.error_reporting(Const.E_ALL & ~Const.E_DEPRECATED);
 			var previousHandler = Global.set_error_handler(function(errno:Int, errstr:String, errfile:String, errline:Int) {
 				if (Global.error_reporting() & errno == 0) {
 					return false;