Umherirrender has uploaded a new change for review.
https://gerrit.wikimedia.org/r/54215
Change subject: Remove error suppression in Exif::isRational
......................................................................
Remove error suppression in Exif::isRational
preg_match throws warning, when getting a array as input, but there is a
is_array check, so no need for error suppression
Change-Id: Ie7f180f45c04e8e396186cd6a5a9e40e2c94a80a
---
M includes/media/Exif.php
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/15/54215/1
diff --git a/includes/media/Exif.php b/includes/media/Exif.php
index c50b2f0..bce9682 100644
--- a/includes/media/Exif.php
+++ b/includes/media/Exif.php
@@ -677,7 +677,7 @@
*/
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' );
--
To view, visit https://gerrit.wikimedia.org/r/54215
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie7f180f45c04e8e396186cd6a5a9e40e2c94a80a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits