Fix PHP7 warning "non well formed numeric value encountered"
authorEdward Chernenko <edwardspec@gmail.com>
Mon, 25 Jun 2018 22:45:13 +0000 (01:45 +0300)
committerEdward Chernenko <edwardspec@gmail.com>
Thu, 28 Jun 2018 21:05:48 +0000 (21:05 +0000)
PHP 7.1 warns when non-numeric string is implicitly cast to integer.

Change-Id: Ia46ea793e9495548c7d421b3372f6deaeda163f5
(cherry picked from commit 0a4a274b6255cc543df459f16902c1619697068f)

includes/media/FormatMetadata.php

index f683da2..3ea71a9 100644 (file)
@@ -271,7 +271,7 @@ class FormatMetadata extends ContextSource {
                                        // TODO: YCbCrCoefficients  #p27 (see annex E)
                                        case 'ExifVersion':
                                        case 'FlashpixVersion':
-                                               $val = "$val" / 100;
+                                               $val = (int)$val / 100;
                                                break;
 
                                        case 'ColorSpace':