summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests/bug46614.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysqli/tests/bug46614.phpt')
-rw-r--r--ext/mysqli/tests/bug46614.phpt32
1 files changed, 32 insertions, 0 deletions
diff --git a/ext/mysqli/tests/bug46614.phpt b/ext/mysqli/tests/bug46614.phpt
new file mode 100644
index 0000000000..84248b1fbb
--- /dev/null
+++ b/ext/mysqli/tests/bug46614.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Bug #46614 (Extended MySQLi class gives incorrect empty() result)
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+if (!defined("MYSQLI_ASYNC")) {
+ die("skip mysqlnd only");
+}
+?>
+--FILE--
+<?php
+class MySQL_Ext extends mysqli{
+ protected $fooData = array();
+
+ public function isEmpty()
+ {
+ $this->extData[] = 'Bar';
+ return empty($this->extData);
+ }
+}
+
+
+
+ include ("connect.inc");
+ $MySQL_Ext = new MySQL_Ext($host, $user, $passwd, $db);
+
+ $isEmpty = $MySQL_Ext->isEmpty();
+ var_dump($isEmpty);
+?>
+--EXPECT--
+bool(false)