And phpt fixes...

On 9/11/06, Hannes Magnusson <[EMAIL PROTECTED]> wrote:
Hello all.

Attached is a patch to tweak expected parameter message a little.

Currently:
 [EMAIL PROTECTED] 5.2$ sapi/cli/php -c php.ini -r '$obj = new DateTime;
timezone_name_get($obj);'
 PHP Warning: timezone_name_get() expects parameter 1 to be
DateTimeZone, object given in Command line code on line 1

After the patch:
 [EMAIL PROTECTED] 5.2$ sapi/cli/php -c php.ini -r '$obj = new DateTime;
timezone_name_get($obj);'
 PHP Warning: timezone_name_get() expects parameter 1 to be
DateTimeZone, DateTime object given in Command line code on line 1

That is, if given parameter is object we print its type out too.

-Hannes


Index: ext/libxml/tests/001.phpt
===================================================================
RCS file: /repository/php-src/ext/libxml/tests/001.phpt,v
retrieving revision 1.2
diff -u -r1.2 001.phpt
--- ext/libxml/tests/001.phpt   27 Jun 2006 22:54:29 -0000      1.2
+++ ext/libxml/tests/001.phpt   10 Sep 2006 22:44:45 -0000
@@ -22,7 +22,7 @@
 bool(false)
 bool(true)
 
-Warning: libxml_use_internal_errors() expects parameter 1 to be boolean, 
object given in %s001.php on line 6
+Warning: libxml_use_internal_errors() expects parameter 1 to be boolean, 
stdClass object given in %s001.php on line 6
 NULL
 array(0) {
 }
Index: ext/openssl/tests/bug38255.phpt
===================================================================
RCS file: /repository/php-src/ext/openssl/tests/bug38255.phpt,v
retrieving revision 1.2
diff -u -r1.2 bug38255.phpt
--- ext/openssl/tests/bug38255.phpt     29 Jul 2006 22:41:34 -0000      1.2
+++ ext/openssl/tests/bug38255.phpt     10 Sep 2006 22:44:45 -0000
@@ -38,10 +38,10 @@
 Warning: openssl_verify(): supplied key param cannot be coerced into a public 
key in %s on line %d
 bool(false)
 
-Warning: openssl_verify() expects parameter 2 to be string, object given in %s 
on line %d
+Warning: openssl_verify() expects parameter 2 to be string, stdClass object 
given in %s on line %d
 NULL
 
-Warning: openssl_verify() expects parameter 2 to be string, object given in %s 
on line %d
+Warning: openssl_verify() expects parameter 2 to be string, stdClass object 
given in %s on line %d
 NULL
 
 Warning: openssl_verify() expects parameter 2 to be string, array given in %s 
on line %d
@@ -50,6 +50,31 @@
 Warning: openssl_verify() expects at least 3 parameters, 0 given in %s on line 
%d
 NULL
 
-Warning: openssl_verify() expects parameter 1 to be string, object given in %s 
on line %d
+Warning: openssl_verify() expects parameter 1 to be string, stdClass object 
given in %s on line %d
 NULL
 Done
+--UEXPECTF--
+Warning: openssl_verify(): supplied key param cannot be coerced into a public 
key in %s on line %d
+
+Warning: openssl_verify(): supplied key param cannot be coerced into a public 
key in %s on line %d
+bool(false)
+
+Warning: openssl_verify(): supplied key param cannot be coerced into a public 
key in %s on line %d
+bool(false)
+
+Warning: openssl_verify() expects parameter 2 to be binary string, stdClass 
object given in %s on line %d
+NULL
+
+Warning: openssl_verify() expects parameter 2 to be binary string, stdClass 
object given in %s on line %d
+NULL
+
+Warning: openssl_verify() expects parameter 2 to be binary string, array given 
in %s on line %d
+NULL
+
+Warning: openssl_verify() expects at least 3 parameters, 0 given in %s on line 
%d
+NULL
+
+Warning: openssl_verify() expects parameter 1 to be binary string, stdClass 
object given in %s on line %d
+NULL
+Done
+
Index: ext/spl/tests/iterator_044.phpt
===================================================================
RCS file: /repository/php-src/ext/spl/tests/iterator_044.phpt,v
retrieving revision 1.1
diff -u -r1.1 iterator_044.phpt
--- ext/spl/tests/iterator_044.phpt     21 May 2006 17:27:12 -0000      1.1
+++ ext/spl/tests/iterator_044.phpt     10 Sep 2006 22:44:45 -0000
@@ -89,10 +89,10 @@
 object(stdClass)#%d (0) {
 }
 
-Warning: CachingIterator::offsetExists() expects parameter 1 to be string 
(Unicode or binary), object given in %siterator_044.php on line %d
+Warning: CachingIterator::offsetExists() expects parameter 1 to be string 
(Unicode or binary), stdClass object given in %siterator_044.php on line %d
 NULL
 
-Warning: CachingIterator::offsetGet() expects parameter 1 to be string 
(Unicode or binary), object given in %siterator_044.php on line %d
+Warning: CachingIterator::offsetGet() expects parameter 1 to be string 
(Unicode or binary), stdClass object given in %siterator_044.php on line %d
 NULL
 ===2===
 object(MyFoo)#%d (0) {
@@ -134,10 +134,10 @@
 object(stdClass)#1 (0) {
 }
 
-Warning: CachingIterator::offsetExists() expects parameter 1 to be string 
(Unicode or binary), object given in %siterator_044.php on line %d
+Warning: CachingIterator::offsetExists() expects parameter 1 to be string 
(Unicode or binary), stdClass object given in %siterator_044.php on line %d
 NULL
 
-Warning: CachingIterator::offsetGet() expects parameter 1 to be string 
(Unicode or binary), object given in %siterator_044.php on line %d
+Warning: CachingIterator::offsetGet() expects parameter 1 to be string 
(Unicode or binary), stdClass object given in %siterator_044.php on line %d
 NULL
 ===2===
 object(MyFoo)#2 (0) {
@@ -184,10 +184,10 @@
 object(stdClass)#%d (0) {
 }
 
-Warning: CachingIterator::offsetExists() expects parameter 1 to be string 
(Unicode or binary), object given in %siterator_044.php on line %d
+Warning: CachingIterator::offsetExists() expects parameter 1 to be string 
(Unicode or binary), stdClass object given in %siterator_044.php on line %d
 NULL
 
-Warning: CachingIterator::offsetGet() expects parameter 1 to be string 
(Unicode or binary), object given in %siterator_044.php on line %d
+Warning: CachingIterator::offsetGet() expects parameter 1 to be string 
(Unicode or binary), stdClass object given in %siterator_044.php on line %d
 NULL
 ===2===
 object(MyFoo)#%d (0) {
@@ -229,10 +229,10 @@
 object(stdClass)#1 (0) {
 }
 
-Warning: CachingIterator::offsetExists() expects parameter 1 to be string 
(Unicode or binary), object given in %siterator_044.php on line %d
+Warning: CachingIterator::offsetExists() expects parameter 1 to be string 
(Unicode or binary), stdClass object given in %siterator_044.php on line %d
 NULL
 
-Warning: CachingIterator::offsetGet() expects parameter 1 to be string 
(Unicode or binary), object given in %siterator_044.php on line %d
+Warning: CachingIterator::offsetGet() expects parameter 1 to be string 
(Unicode or binary), stdClass object given in %siterator_044.php on line %d
 NULL
 ===2===
 object(MyFoo)#2 (0) {
Index: ext/standard/tests/image/image_type_to_extension.phpt
===================================================================
RCS file: 
/repository/php-src/ext/standard/tests/image/image_type_to_extension.phpt,v
retrieving revision 1.2
diff -u -r1.2 image_type_to_extension.phpt
--- ext/standard/tests/image/image_type_to_extension.phpt       25 Jun 2006 
21:23:38 -0000      1.2
+++ ext/standard/tests/image/image_type_to_extension.phpt       10 Sep 2006 
22:44:45 -0000
@@ -90,7 +90,7 @@
 Warning: image_type_to_extension() expects parameter 2 to be boolean, array 
given in %s on line %d
 bool(false)
 
-Warning: image_type_to_extension() expects parameter 1 to be long, object 
given in %s on line %d
+Warning: image_type_to_extension() expects parameter 1 to be long, stdClass 
object given in %s on line %d
 bool(false)
 bool(false)
 
Index: ext/standard/tests/strings/str_word_count.phpt
===================================================================
RCS file: /repository/php-src/ext/standard/tests/strings/str_word_count.phpt,v
retrieving revision 1.8
diff -u -r1.8 str_word_count.phpt
--- ext/standard/tests/strings/str_word_count.phpt      28 Aug 2006 19:52:01 
-0000      1.8
+++ ext/standard/tests/strings/str_word_count.phpt      10 Sep 2006 22:44:45 
-0000
@@ -91,7 +91,7 @@
 Warning: str_word_count() expects parameter 3 to be string (Unicode or 
binary), array given in %s on line %d
 NULL
 
-Warning: str_word_count() expects parameter 3 to be string (Unicode or 
binary), object given in %s on line %d
+Warning: str_word_count() expects parameter 3 to be string (Unicode or 
binary), stdClass object given in %s on line %d
 NULL
 int(7)
 array(5) {
@@ -136,7 +136,7 @@
 Warning: str_word_count() expects parameter 3 to be string (Unicode or 
binary), array given in %s on line %d
 NULL
 
-Warning: str_word_count() expects parameter 3 to be string (Unicode or 
binary), object given in %s on line %d
+Warning: str_word_count() expects parameter 3 to be string (Unicode or 
binary), stdClass object given in %s on line %d
 NULL
 array(7) {
   [0]=>
@@ -196,7 +196,7 @@
 Warning: str_word_count() expects parameter 3 to be string (Unicode or 
binary), array given in %s on line %d
 NULL
 
-Warning: str_word_count() expects parameter 3 to be string (Unicode or 
binary), object given in %s on line %d
+Warning: str_word_count() expects parameter 3 to be string (Unicode or 
binary), stdClass object given in %s on line %d
 NULL
 array(7) {
   [0]=>
@@ -285,7 +285,7 @@
 Warning: str_word_count() expects parameter 3 to be string (Unicode or 
binary), array given in %s on line %d
 NULL
 
-Warning: str_word_count() expects parameter 3 to be string (Unicode or 
binary), object given in %s on line %d
+Warning: str_word_count() expects parameter 3 to be string (Unicode or 
binary), stdClass object given in %s on line %d
 NULL
 int(7)
 array(5) {
@@ -330,7 +330,7 @@
 Warning: str_word_count() expects parameter 3 to be string (Unicode or 
binary), array given in %s on line %d
 NULL
 
-Warning: str_word_count() expects parameter 3 to be string (Unicode or 
binary), object given in %s on line %d
+Warning: str_word_count() expects parameter 3 to be string (Unicode or 
binary), stdClass object given in %s on line %d
 NULL
 array(7) {
   [0]=>
@@ -390,7 +390,7 @@
 Warning: str_word_count() expects parameter 3 to be string (Unicode or 
binary), array given in %s on line %d
 NULL
 
-Warning: str_word_count() expects parameter 3 to be string (Unicode or 
binary), object given in %s on line %d
+Warning: str_word_count() expects parameter 3 to be string (Unicode or 
binary), stdClass object given in %s on line %d
 NULL
 array(7) {
   [0]=>
Index: ext/standard/tests/strings/substr_compare.phpt
===================================================================
RCS file: /repository/php-src/ext/standard/tests/strings/substr_compare.phpt,v
retrieving revision 1.4
diff -u -r1.4 substr_compare.phpt
--- ext/standard/tests/strings/substr_compare.phpt      20 Jun 2006 19:49:44 
-0000      1.4
+++ ext/standard/tests/strings/substr_compare.phpt      10 Sep 2006 22:44:45 
-0000
@@ -27,7 +27,7 @@
 Warning: substr_compare(): The start position cannot exceed initial string 
length in %s on line %d
 bool(false)
 
-Warning: substr_compare() expects parameter 5 to be boolean, object given in 
%s on line %d
+Warning: substr_compare() expects parameter 5 to be boolean, stdClass object 
given in %s on line %d
 bool(false)
 Test
 
@@ -47,7 +47,7 @@
 Warning: substr_compare(): The start position cannot exceed initial string 
length in %s on line %d
 bool(false)
 
-Warning: substr_compare() expects parameter 5 to be boolean, object given in 
%s on line %d
+Warning: substr_compare() expects parameter 5 to be boolean, stdClass object 
given in %s on line %d
 bool(false)
 Test
 
Index: ext/tokenizer/tests/003.phpt
===================================================================
RCS file: /repository/php-src/ext/tokenizer/tests/003.phpt,v
retrieving revision 1.6
diff -u -r1.6 003.phpt
--- ext/tokenizer/tests/003.phpt        20 Jun 2006 18:14:12 -0000      1.6
+++ ext/tokenizer/tests/003.phpt        10 Sep 2006 22:44:45 -0000
@@ -17,7 +17,7 @@
 Warning: token_get_all() expects parameter 1 to be string, array given in %s 
on line %d
 NULL
 
-Warning: token_get_all() expects parameter 1 to be string, object given in %s 
on line %d
+Warning: token_get_all() expects parameter 1 to be string, stdClass object 
given in %s on line %d
 NULL
 array(0) {
 }
@@ -44,7 +44,7 @@
 Warning: token_get_all() expects parameter 1 to be binary string, array given 
in %s on line %d
 NULL
 
-Warning: token_get_all() expects parameter 1 to be binary string, object given 
in %s on line %d
+Warning: token_get_all() expects parameter 1 to be binary string, stdClass 
object given in %s on line %d
 NULL
 array(0) {
 }
Index: ext/libxml/tests/001.phpt
===================================================================
RCS file: /repository/php-src/ext/libxml/tests/001.phpt,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 001.phpt
--- ext/libxml/tests/001.phpt   27 Jun 2006 22:43:26 -0000      1.1.2.1
+++ ext/libxml/tests/001.phpt   10 Sep 2006 22:36:54 -0000
@@ -22,7 +22,7 @@
 bool(false)
 bool(true)
 
-Warning: libxml_use_internal_errors() expects parameter 1 to be boolean, 
object given in %s001.php on line 6
+Warning: libxml_use_internal_errors() expects parameter 1 to be boolean, 
stdClass object given in %s001.php on line 6
 NULL
 array(0) {
 }
Index: ext/openssl/tests/bug38255.phpt
===================================================================
RCS file: /repository/php-src/ext/openssl/tests/bug38255.phpt,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 bug38255.phpt
--- ext/openssl/tests/bug38255.phpt     29 Jul 2006 22:41:19 -0000      1.1.2.3
+++ ext/openssl/tests/bug38255.phpt     10 Sep 2006 22:36:54 -0000
@@ -38,10 +38,10 @@
 Warning: openssl_verify(): supplied key param cannot be coerced into a public 
key in %s on line %d
 bool(false)
 
-Warning: openssl_verify() expects parameter 2 to be string, object given in %s 
on line %d
+Warning: openssl_verify() expects parameter 2 to be string, stdClass object 
given in %s on line %d
 NULL
 
-Warning: openssl_verify() expects parameter 2 to be string, object given in %s 
on line %d
+Warning: openssl_verify() expects parameter 2 to be string, stdClass object 
given in %s on line %d
 NULL
 
 Warning: openssl_verify() expects parameter 2 to be string, array given in %s 
on line %d
@@ -50,6 +50,6 @@
 Warning: openssl_verify() expects at least 3 parameters, 0 given in %s on line 
%d
 NULL
 
-Warning: openssl_verify() expects parameter 1 to be string, object given in %s 
on line %d
+Warning: openssl_verify() expects parameter 1 to be string, stdClass object 
given in %s on line %d
 NULL
 Done
Index: ext/spl/tests/iterator_044.phpt
===================================================================
RCS file: /repository/php-src/ext/spl/tests/iterator_044.phpt,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 iterator_044.phpt
--- ext/spl/tests/iterator_044.phpt     21 May 2006 18:13:37 -0000      1.1.2.2
+++ ext/spl/tests/iterator_044.phpt     10 Sep 2006 22:36:54 -0000
@@ -91,10 +91,10 @@
 object(stdClass)#%d (0) {
 }
 
-Warning: CachingIterator::offsetExists() expects parameter 1 to be string, 
object given in %siterator_044.php on line %d
+Warning: CachingIterator::offsetExists() expects parameter 1 to be string, 
stdClass object given in %siterator_044.php on line %d
 NULL
 
-Warning: CachingIterator::offsetGet() expects parameter 1 to be string, object 
given in %siterator_044.php on line %d
+Warning: CachingIterator::offsetGet() expects parameter 1 to be string, 
stdClass object given in %siterator_044.php on line %d
 NULL
 ===2===
 object(MyFoo)#%d (0) {
@@ -136,10 +136,10 @@
 object(stdClass)#1 (0) {
 }
 
-Warning: CachingIterator::offsetExists() expects parameter 1 to be string, 
object given in %siterator_044.php on line %d
+Warning: CachingIterator::offsetExists() expects parameter 1 to be string, 
stdClass object given in %siterator_044.php on line %d
 NULL
 
-Warning: CachingIterator::offsetGet() expects parameter 1 to be string, object 
given in %siterator_044.php on line %d
+Warning: CachingIterator::offsetGet() expects parameter 1 to be string, 
stdClass object given in %siterator_044.php on line %d
 NULL
 ===2===
 object(MyFoo)#2 (0) {
Index: ext/standard/tests/image/image_type_to_extension.phpt
===================================================================
RCS file: 
/repository/php-src/ext/standard/tests/image/image_type_to_extension.phpt,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 image_type_to_extension.phpt
--- ext/standard/tests/image/image_type_to_extension.phpt       25 Jun 2006 
21:21:59 -0000      1.1.2.3
+++ ext/standard/tests/image/image_type_to_extension.phpt       10 Sep 2006 
22:36:54 -0000
@@ -90,7 +90,7 @@
 Warning: image_type_to_extension() expects parameter 2 to be boolean, array 
given in %s on line %d
 bool(false)
 
-Warning: image_type_to_extension() expects parameter 1 to be long, object 
given in %s on line %d
+Warning: image_type_to_extension() expects parameter 1 to be long, stdClass 
object given in %s on line %d
 bool(false)
 bool(false)
 
Index: ext/standard/tests/strings/str_word_count.phpt
===================================================================
RCS file: /repository/php-src/ext/standard/tests/strings/str_word_count.phpt,v
retrieving revision 1.4.2.1
diff -u -r1.4.2.1 str_word_count.phpt
--- ext/standard/tests/strings/str_word_count.phpt      29 Nov 2005 16:14:18 
-0000      1.4.2.1
+++ ext/standard/tests/strings/str_word_count.phpt      10 Sep 2006 22:36:54 
-0000
@@ -97,7 +97,7 @@
 Warning: Wrong parameter count for str_word_count() in %s on line 21
 NULL
 
-Warning: str_word_count() expects parameter 3 to be string, object given in %s 
on line 22
+Warning: str_word_count() expects parameter 3 to be string, stdClass object 
given in %s on line 22
 
 Warning: Wrong parameter count for str_word_count() in %s on line 22
 NULL
@@ -146,7 +146,7 @@
 Warning: Wrong parameter count for str_word_count() in %s on line 27
 NULL
 
-Warning: str_word_count() expects parameter 3 to be string, object given in %s 
on line 28
+Warning: str_word_count() expects parameter 3 to be string, stdClass object 
given in %s on line 28
 
 Warning: Wrong parameter count for str_word_count() in %s on line 28
 NULL
@@ -210,7 +210,7 @@
 Warning: Wrong parameter count for str_word_count() in %s on line 33
 NULL
 
-Warning: str_word_count() expects parameter 3 to be string, object given in %s 
on line 34
+Warning: str_word_count() expects parameter 3 to be string, stdClass object 
given in %s on line 34
 
 Warning: Wrong parameter count for str_word_count() in %s on line 34
 NULL
Index: ext/standard/tests/strings/substr_compare.phpt
===================================================================
RCS file: /repository/php-src/ext/standard/tests/strings/substr_compare.phpt,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 substr_compare.phpt
--- ext/standard/tests/strings/substr_compare.phpt      25 Apr 2006 12:49:59 
-0000      1.1.2.2
+++ ext/standard/tests/strings/substr_compare.phpt      10 Sep 2006 22:36:54 
-0000
@@ -27,7 +27,7 @@
 Warning: substr_compare(): The start position cannot exceed initial string 
length in %s on line %d
 bool(false)
 
-Warning: substr_compare() expects parameter 5 to be boolean, object given in 
%s on line %d
+Warning: substr_compare() expects parameter 5 to be boolean, stdClass object 
given in %s on line %d
 bool(false)
 Test
 
Index: ext/tokenizer/tests/003.phpt
===================================================================
RCS file: /repository/php-src/ext/tokenizer/tests/003.phpt,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 003.phpt
--- ext/tokenizer/tests/003.phpt        20 Apr 2006 01:06:58 -0000      1.1.2.3
+++ ext/tokenizer/tests/003.phpt        10 Sep 2006 22:36:54 -0000
@@ -17,7 +17,7 @@
 Warning: token_get_all() expects parameter 1 to be string, array given in %s 
on line %d
 NULL
 
-Warning: token_get_all() expects parameter 1 to be string, object given in %s 
on line %d
+Warning: token_get_all() expects parameter 1 to be string, stdClass object 
given in %s on line %d
 NULL
 array(0) {
 }
-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to