]> granicus.if.org Git - php/commitdiff
- add test for callback with non modified var
authorPierre Joye <pajoye@php.net>
Wed, 25 Oct 2006 17:23:45 +0000 (17:23 +0000)
committerPierre Joye <pajoye@php.net>
Wed, 25 Oct 2006 17:23:45 +0000 (17:23 +0000)
- update changelog

ext/filter/package.xml
ext/filter/tests/callback_non_modified_var.phpt [new file with mode: 0644]

index adef3346305f9b40723b419562f1b761fa3c194b..09d43970f778e4a6dfbd11de3f01e7b516225407 100644 (file)
@@ -31,7 +31,7 @@ of filters and mechanisms that users can use to safely access their input data.
     <email>iliaa@php.net</email>
     <active>yes</active>
   </lead>
-  <date>2006-05-10</date>
+  <date>2006-25-10</date>
   <version>
     <release>0.11.0</release>
     <api>0.11.0</api>
@@ -41,11 +41,13 @@ of filters and mechanisms that users can use to safely access their input data.
     <api>beta</api>
   </stability>
   <license uri="http://www.php.net/license">PHP</license>
-  <notes>- Attention, this release contains BC breaks, the API has been rewamped
+  <notes>* Attention, this release contains BC breaks, the API has been rewamped *
+see the manuals and the examples for more details about the new API
 - Fixed possible bug in all filtering functions, input value was modified
 - Filters operate now on a copy of the data, allow to safely fetch multiple times the same values
-- add two modes: FILTER_REQUIRE_ARRAY and FILTER_FORCE_ARRAY
-- see the manuals and the examples for more details about the new API
+- Added three flags: FILTER_REQUIRE_ARRAY, FILTER_FORCE_ARRAY and FILTER_NULL_ON_FAILURE
+- Fixed a bug in FILTER_CALLBACK when a non modified value is returned
+- Improve support of _SERVER/_ENV (apache1 only)
 </notes>
   <contents>
     <dir name="/">
@@ -100,6 +102,7 @@ of filters and mechanisms that users can use to safely access their input data.
         <file role="test" name="bug7715.phpt"/>
         <file role="test" name="bug8315.phpt"/>
         <file role="test" name="bug7586.phpt"/>
+        <file role="test" name="callback_non_modified_var.phpt"/>
       </dir>
     </dir>
 <!-- / -->
diff --git a/ext/filter/tests/callback_non_modified_var.phpt b/ext/filter/tests/callback_non_modified_var.phpt
new file mode 100644 (file)
index 0000000..6f1f8bf
--- /dev/null
@@ -0,0 +1,12 @@
+--TEST--
+callback function returns non modified value
+--FILE--
+<?php
+function callback($var) {
+       return $var;
+}
+$var = "test";
+var_dump(filter_var($var, FILTER_CALLBACK, array('options'=>'callback')));
+?>
+--EXPECT--     
+string(4) "test"