1
0
mirror of https://github.com/php/php-src.git synced 2026-04-10 17:43:13 +02:00

- Add missing test

This commit is contained in:
Jani Taskinen
2009-04-30 10:41:09 +00:00
parent affb9d9b49
commit e51d4cb545
2 changed files with 29 additions and 0 deletions

View File

@@ -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

View File

@@ -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)
}