]> git.joonet.de Git - adminer.git/commitdiff
Re-enable PHP warnings
authorJakub Vrana <jakub@vrana.cz>
Wed, 9 Dec 2020 14:09:28 +0000 (15:09 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 9 Dec 2020 14:45:54 +0000 (15:45 +0100)
adminer/include/bootstrap.inc.php
adminer/include/version.inc.php
changes.txt
compile.php

index 04fb5cdd12fc83e7b650f2bafce27562cee12eb3..1a6f3c4d8e1cbdd7fd9343e5317e9f755a29ebf3 100644 (file)
@@ -1,5 +1,10 @@
 <?php
-error_reporting(6133); // errors
+function adminer_errors($errno, $errstr) {
+       return !!preg_match('~^(Trying to access array offset on value of type null|Undefined array key)~', $errstr);
+}
+
+error_reporting(6135); // errors and warnings
+set_error_handler('adminer_errors', 2); // 2 - E_WARNING
 
 include "../adminer/include/coverage.inc.php";
 
index 8a0f069fe39255a05d71c22a7104c94c25e3ddcc..c2290e8a33932448e9a5893c9914774f6f8aed21 100644 (file)
@@ -1,2 +1,2 @@
 <?php
-$VERSION = "4.7.8";
+$VERSION = "4.7.9-dev";
index 10eb654a1ecae1767302de07845a7d9c2405a755..cb729decbf0a99ce00b6ba472f51fb76f8b01db1 100644 (file)
@@ -1,3 +1,6 @@
+Adminer 4.7.9-dev:
+Re-enable PHP warnings (regression from 4.7.8)
+
 Adminer 4.7.8 (released 2020-12-06):
 Support PHP 8
 Disallow connecting to privileged ports (bug #769)
index 3bb1b6acf4ae265305d790f1fd9a9441443366cf..574fe6efbaffa8ba13d4075d325f0bca31033ba5 100755 (executable)
@@ -1,6 +1,11 @@
 #!/usr/bin/env php
 <?php
-error_reporting(6133); // errors
+function adminer_errors($errno, $errstr) {
+       return !!preg_match('~^(Trying to access array offset on value of type null|Undefined array key)~', $errstr);
+}
+
+error_reporting(6135); // errors and warnings
+set_error_handler('adminer_errors', 2); // 2 - E_WARNING
 include dirname(__FILE__) . "/adminer/include/version.inc.php";
 include dirname(__FILE__) . "/externals/JsShrink/jsShrink.php";
 
@@ -100,7 +105,7 @@ function lzw_compress($string) {
        $word = "";
        $codes = array();
        for ($i=0; $i <= strlen($string); $i++) {
-               $x = $string[$i];
+               $x = @$string[$i];
                if (strlen($x) && isset($dictionary[$word . $x])) {
                        $word .= $x;
                } elseif ($i) {