]> granicus.if.org Git - php/commitdiff
Fix mcrypt_ecb tests after deprecation
authorNikita Popov <nikic@php.net>
Mon, 13 Aug 2012 18:29:55 +0000 (20:29 +0200)
committerNikita Popov <nikic@php.net>
Mon, 13 Aug 2012 18:30:53 +0000 (20:30 +0200)
ext/mcrypt/tests/mcrypt_ecb.phpt
ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt
ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt
ext/mcrypt/tests/mcrypt_ecb_error.phpt
ext/mcrypt/tests/mcrypt_ecb_variation1.phpt
ext/mcrypt/tests/mcrypt_ecb_variation2.phpt
ext/mcrypt/tests/mcrypt_ecb_variation3.phpt
ext/mcrypt/tests/mcrypt_ecb_variation4.phpt
ext/mcrypt/tests/mcrypt_ecb_variation5.phpt

index e75d9fa6cde2bd081652dee3907de20dac4e2b01..b6d0a227865abf3bed8721962ba83a511c3dc0c4 100644 (file)
@@ -18,4 +18,10 @@ echo trim(mcrypt_ecb($cipher, $key, $enc_data, MCRYPT_DECRYPT, $iv)) . "\n";
 mcrypt_ecb($cipher, $key, $enc_data, MCRYPT_DECRYPT);
 
 --EXPECTF--
+
+Deprecated: Function mcrypt_ecb() is deprecated in %s on line %d
+
+Deprecated: Function mcrypt_ecb() is deprecated in %s on line %d
 PHP Testfest 2008
+
+Deprecated: Function mcrypt_ecb() is deprecated in %s on line %d
index 7a5cc27f4433c9a2f61e54773013d8dd5da2d3b7..82f9608da8d1b31a0a4de33961588c66f019f1c0 100644 (file)
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
 ?>
 --FILE--
 <?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
 /* Prototype  : string mcrypt_ecb(int cipher, string key, string data, int mode, string iv)
  * Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv 
  * Source code: ext/mcrypt/mcrypt.c
@@ -94,4 +96,4 @@ string(32) "736563726574206d6573736167650000"
 
 iv length=9
 string(32) "736563726574206d6573736167650000"
-===DONE===
\ No newline at end of file
+===DONE===
index da26b4ba83e9bb9bdf95a9f2824e813883eca383..50107b4b0f48b68884da7b6e03b09e3be2d4ec40 100644 (file)
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
 ?>
 --FILE--
 <?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
 /* Prototype  : string mcrypt_ecb(int cipher, string key, string data, int mode, string iv)
  * Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv 
  * Source code: ext/mcrypt/mcrypt.c
index b33034afcbb6f15e02ffc961ed25300844e38a4e..7e521f2225e6c5e884649fbff5df185e472d8a0f 100644 (file)
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
 ?>
 --FILE--
 <?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
 /* Prototype  : string mcrypt_ecb(int cipher, string key, string data, int mode, string iv)
  * Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv 
  * Source code: ext/mcrypt/mcrypt.c
index 282a0cce1d3c5878c44a4c88d2094a943a201d45..7271deec132ee29e0038f2c7eafb243a17ff59e3 100644 (file)
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
 ?>
 --FILE--
 <?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
 /* Prototype  : string mcrypt_ecb(string cipher, string key, string data, int mode, string iv)
  * Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv 
  * Source code: ext/mcrypt/mcrypt.c
@@ -18,7 +20,7 @@ echo "*** Testing mcrypt_ecb() : usage variation ***\n";
 
 // Define error handler
 function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
-       if (error_reporting() != 0) {
+       if ($err_no & error_reporting()) {
                // report non-silenced errors
                echo "Error: $err_no - $err_msg, $filename($linenum)\n";
        }
index 49e0a551f889e4b72819b320374befb8dfe51d28..ed57400e0fb912da46389f7359f198df87c09ba3 100644 (file)
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
 ?>
 --FILE--
 <?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
 /* Prototype  : string mcrypt_ecb(string cipher, string key, string data, int mode, string iv)
  * Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv 
  * Source code: ext/mcrypt/mcrypt.c
@@ -18,7 +20,7 @@ echo "*** Testing mcrypt_ecb() : usage variation ***\n";
 
 // Define error handler
 function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
-       if (error_reporting() != 0) {
+       if ($err_no & error_reporting()) {
                // report non-silenced errors
                echo "Error: $err_no - $err_msg, $filename($linenum)\n";
        }
index cedda4930ad8c405d146dc35788faf743020ee49..29993045633e0cb2a112bc6584433ff130ee1278 100644 (file)
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
 ?>
 --FILE--
 <?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
 /* Prototype  : string mcrypt_ecb(string cipher, string key, string data, int mode, string iv)
  * Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv 
  * Source code: ext/mcrypt/mcrypt.c
@@ -18,7 +20,7 @@ echo "*** Testing mcrypt_ecb() : usage variation ***\n";
 
 // Define error handler
 function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
-       if (error_reporting() != 0) {
+       if ($err_no & error_reporting()) {
                // report non-silenced errors
                echo "Error: $err_no - $err_msg, $filename($linenum)\n";
        }
index 599b4fbe70d9a4a93c96d381c9ced60996834f13..e52040e29521908620f76a04f83ac64bf0dc84b7 100644 (file)
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
 ?>
 --FILE--
 <?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
 /* Prototype  : string mcrypt_ecb(string cipher, string key, string data, int mode, string iv)
  * Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv 
  * Source code: ext/mcrypt/mcrypt.c
@@ -18,7 +20,7 @@ echo "*** Testing mcrypt_ecb() : usage variation ***\n";
 
 // Define error handler
 function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
-       if (error_reporting() != 0) {
+       if ($err_no & error_reporting()) {
                // report non-silenced errors
                echo "Error: $err_no - $err_msg, $filename($linenum)\n";
        }
index f64744fcdfa530b58c8be2e85362375a70600b5e..3f4f7f5ddbcdeb5709f0011e799a7a4197528644 100644 (file)
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
 ?>
 --FILE--
 <?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
 /* Prototype  : string mcrypt_ecb(string cipher, string key, string data, int mode, string iv)
  * Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv 
  * Source code: ext/mcrypt/mcrypt.c
@@ -18,7 +20,7 @@ echo "*** Testing mcrypt_ecb() : usage variation ***\n";
 
 // Define error handler
 function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
-       if (error_reporting() != 0) {
+       if ($err_no & error_reporting()) {
                // report non-silenced errors
                echo "Error: $err_no - $err_msg, $filename($linenum)\n";
        }