From: Ulf Wendel Date: Thu, 28 May 2009 18:27:44 +0000 (+0000) Subject: Andrey needs to have a look at this one. The bug report itself is bogus. However... X-Git-Tag: php-5.4.0alpha1~191^2~3474 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db3f0aa99e2065a43953663b002b4ca7ad9d0733;p=php Andrey needs to have a look at this one. The bug report itself is bogus. However, the bug report shows a result set and that is wrong. --- diff --git a/ext/mysqli/tests/bug45289.phpt b/ext/mysqli/tests/bug45289.phpt new file mode 100644 index 0000000000..77160e3a41 --- /dev/null +++ b/ext/mysqli/tests/bug45289.phpt @@ -0,0 +1,31 @@ +--TEST-- +Bug #45289 (Bogus store_result on PS) +--SKIPIF-- + +--FILE-- +prepare('SELECT id, label FROM test WHERE id=? LIMIT 1'))) + printf("[001] [%d] %s\n", $link->errno, $link->error); + + if (!$stmt->bind_param('i', $id) || !$stmt->execute()) + printf("[002] [%d] %s\n", $stmt->errno, $stmt->error); + + if ($res = $link->store_result()) { + printf("[003] Can store result!\n"); + } else { + printf("[003] [%d] %s\n", $link->errno, $link->error); + } + + var_dump($res->fetch_assoc()); +?> +--EXPECTF-- +[003] [0%s + +Fatal error: Call to a member function fetch_assoc() on a non-object in %s on line %d \ No newline at end of file