jani            Thu Apr 30 10:41:09 2009 UTC

  Modified files:              
    /php-src/ext/curl/tests     bug46711.phpt bug45161.phpt 
  Log:
  - Add missing test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/tests/bug46711.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/curl/tests/bug46711.phpt
diff -u /dev/null php-src/ext/curl/tests/bug46711.phpt:1.2
--- /dev/null   Thu Apr 30 10:41:09 2009
+++ php-src/ext/curl/tests/bug46711.phpt        Thu Apr 30 10:41:09 2009
@@ -0,0 +1,27 @@
+--TEST--
+Bug #46711 (lost memory when foreach is used for values passed to 
curl_setopt())
+--FILE--
+<?php
+$ch = curl_init();
+
+$opt = array(
+       CURLOPT_AUTOREFERER  => TRUE,
+       CURLOPT_BINARYTRANSFER => TRUE
+);
+
+curl_setopt( $ch, CURLOPT_AUTOREFERER  , TRUE );
+
+foreach( $opt as $option => $value ) {
+       curl_setopt( $ch, $option, $value );
+}
+
+var_dump($opt); // with this bug, $opt[58] becomes NULL
+
+?>
+--EXPECT--
+array(2) {
+  [58]=>
+  bool(true)
+  [19914]=>
+  bool(true)
+}
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/tests/bug45161.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/curl/tests/bug45161.phpt
diff -u php-src/ext/curl/tests/bug45161.phpt:1.1 
php-src/ext/curl/tests/bug45161.phpt:1.2
--- php-src/ext/curl/tests/bug45161.phpt:1.1    Wed Dec 17 13:59:21 2008
+++ php-src/ext/curl/tests/bug45161.phpt        Thu Apr 30 10:41:09 2009
@@ -1,5 +1,7 @@
 --TEST--
 Bug #45161 (Reusing a curl handle leaks memory)
+--SKIPIF--
+<?php $curl_version = curl_version(); if ($curl_version['version_number'] < 
0x071100) die("skip: test works only with curl >= 7.17.0"); ?>
 --FILE--
 <?php
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to