Merge "Use gettype only for debugging text"
[lhc/web/wiklou.git] / includes / media / Exif.php
index c50b2f0..5664d59 100644 (file)
@@ -363,7 +363,7 @@ class Exif {
         * As an alternative approach, some of this could be done in the validate phase
         * if we make up our own types like Exif::DATE.
         */
-       function collapseData( ) {
+       function collapseData() {
 
                $this->exifGPStoNumber( 'GPSLatitude' );
                $this->exifGPStoNumber( 'GPSDestLatitude' );
@@ -545,7 +545,7 @@ class Exif {
         *
         * @deprecated since 1.18
         */
-       function makeFormattedData( ) {
+       function makeFormattedData() {
                wfDeprecated( __METHOD__, '1.18' );
                $this->mFormattedExifData = FormatMetadata::getFormattedData(
                        $this->mFilteredExifData );
@@ -677,7 +677,7 @@ class Exif {
         */
        private function isRational( $in ) {
                $m = array();
-               if ( !is_array( $in ) && @preg_match( '/^(\d+)\/(\d+[1-9]|[1-9]\d*)$/', $in, $m ) ) { # Avoid division by zero
+               if ( !is_array( $in ) && preg_match( '/^(\d+)\/(\d+[1-9]|[1-9]\d*)$/', $in, $m ) ) { # Avoid division by zero
                        return $this->isLong( $m[1] ) && $this->isLong( $m[2] );
                } else {
                        $this->debug( $in, __FUNCTION__, 'fed a non-fraction value' );
@@ -808,7 +808,7 @@ class Exif {
                }
                $type = gettype( $in );
                $class = ucfirst( __CLASS__ );
-               if ( $type === 'array' ) {
+               if ( is_array( $in ) ) {
                        $in = print_r( $in, true );
                }