]> granicus.if.org Git - php/commitdiff
Added test for #60104
authorPatrick Allaert <patrickallaert@php.net>
Wed, 26 Oct 2011 09:32:37 +0000 (09:32 +0000)
committerPatrick Allaert <patrickallaert@php.net>
Wed, 26 Oct 2011 09:32:37 +0000 (09:32 +0000)
ext/pdo_sqlite/tests/bug60104.phpt [new file with mode: 0644]

diff --git a/ext/pdo_sqlite/tests/bug60104.phpt b/ext/pdo_sqlite/tests/bug60104.phpt
new file mode 100644 (file)
index 0000000..fd36b57
--- /dev/null
@@ -0,0 +1,21 @@
+--TEST--
+Bug #60104 (Segmentation Fault in pdo_sqlite when using sqliteCreateFunction())
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
+?>
+--FILE--
+<?php
+function setUp()
+{
+    $handler = new PDO( "sqlite::memory:" );
+    $handler->sqliteCreateFunction( "md5", "md5", 1 );
+    unset( $handler );
+}
+
+setUp();
+setUp();
+echo "done";
+?>
+--EXPECTF--
+done