]> granicus.if.org Git - php/commitdiff
Fix invalid array access in mysqli_fork test
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 10 Jul 2019 09:39:30 +0000 (11:39 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 10 Jul 2019 09:59:27 +0000 (11:59 +0200)
ext/mysqli/tests/mysqli_fork.phpt

index 24cfae7a9a5e7057a5509a79b0d7d52fa12bb3e3..2730432fd4e71ac4b1e39946119b74e1d8e00ee0 100644 (file)
@@ -143,7 +143,7 @@ if (!have_innodb($link))
                                $wait_id = pcntl_waitpid($pid, $status, WNOHANG);
                                if ($pres = mysqli_query($plink, $sql)) {
                                        $row = mysqli_fetch_assoc($pres);
-                                       if ($row['msg_id'] != $last_msg_id) {
+                                       if ($row && $row['msg_id'] != $last_msg_id) {
                                                $last_msg_id = $row['msg_id'];
                                                switch ($row['msg']) {
                                                        case 'start':