Index: trunk/phase3/tests/phpunit/includes/GlobalFunctions/GlobalTest.php |
— | — | @@ -878,12 +878,6 @@ |
879 | 879 | // are less consistent. |
880 | 880 | ); |
881 | 881 | } |
882 | | - |
883 | | - public function testUnserialize() { |
884 | | - $this->assertEquals( '', wfUnserialize( 's:0:"";') ); |
885 | | - $this->assertEquals( false, wfUnserialize( '0' ), |
886 | | - 'Invalid input to unserialize()' ); |
887 | | - } |
888 | 882 | |
889 | 883 | /* TODO: many more! */ |
890 | 884 | } |
Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -3540,17 +3540,3 @@ |
3541 | 3541 | function wfRunHooks( $event, $args = array() ) { |
3542 | 3542 | return Hooks::run( $event, $args ); |
3543 | 3543 | } |
3544 | | - |
3545 | | -/** |
3546 | | - * Unserialize a string to a PHP value without throwing E_NOTICE. Simply a |
3547 | | - * wrapper around unserialize() |
3548 | | - * |
3549 | | - * @param $data string The serialized string |
3550 | | - * @return mixed |
3551 | | - */ |
3552 | | -function wfUnserialize( $data ) { |
3553 | | - wfSuppressWarnings(); |
3554 | | - $result = unserialize( $data ); |
3555 | | - wfRestoreWarnings(); |
3556 | | - return $result; |
3557 | | -} |
Index: trunk/phase3/includes/media/ExifBitmap.php |
— | — | @@ -110,7 +110,7 @@ |
111 | 111 | return false; |
112 | 112 | } |
113 | 113 | |
114 | | - $exif = wfUnserialize( $metadata ); |
| 114 | + $exif = unserialize( $metadata ); |
115 | 115 | if ( !$exif ) { |
116 | 116 | return false; |
117 | 117 | } |