Author: uwendel
Date: 2007-07-19 09:35:31 +0200 (Thu, 19 Jul 2007)
New Revision: 792
Added:
trunk/tests/ext/mysqli/mysqli_unclonable.phpt
Log:
Cloning of a mysqli object won't work.
Added: trunk/tests/ext/mysqli/mysqli_unclonable.phpt
===================================================================
--- trunk/tests/ext/mysqli/mysqli_unclonable.phpt 2007-07-18 22:00:11 UTC (rev 791)
+++ trunk/tests/ext/mysqli/mysqli_unclonable.phpt 2007-07-19 07:35:31 UTC (rev 792)
@@ -0,0 +1,20 @@
+--TEST--
+Trying to clone mysqli object
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+<?php require_once('skipifemb.inc'); ?>
+--FILE--
+<?php
+ include "connect.inc";
+
+ if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***,
dbname=%s, port=%s, socket=%s\n",
+ $host, $user, $db, $port, $socket);
+
+ $link_clone = clone $link;
+ mysqli_close($link);
+
+ print "done!";
+?>
+--EXPECTF--
+Fatal error: Trying to clone an uncloneable object of class mysqli in %s on line %d
\ No newline at end of file
| Thread |
|---|
| • PHP mysqlnd svn commit: r792 - trunk/tests/ext/mysqli | uwendel | 19 Jul |