Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/145875
Change subject: Fix for TMH "Error missing media source" under HHVM ...................................................................... Fix for TMH "Error missing media source" under HHVM Media players inline showed only as "Error missing media source". Appears to be due to use of current() to get the first element of an array, assuming that the key pointer was reset. In HHVM, magic reset on pass-by-value doesn't appear to happen. Adding a manual reset() before the current() usage fixes it. Bug: 67937 Change-Id: I606048cca847ec4927e2a59c44d819dda067db3a --- M TimedMediaTransformOutput.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/75/145875/1 diff --git a/TimedMediaTransformOutput.php b/TimedMediaTransformOutput.php index 15bee30..18415f9 100644 --- a/TimedMediaTransformOutput.php +++ b/TimedMediaTransformOutput.php @@ -244,6 +244,7 @@ function getHtmlMediaTagOutput( $sizeOverride = array(), $autoPlay = false ){ // Try to get the first source src attribute ( usually this should be the source file ) $mediaSources = $this->getMediaSources(); + reset( $mediaSources ); // do not rely on auto-resetting of arrays under HHVM $firstSource = current( $mediaSources ); if( !$firstSource['src'] ){ -- To view, visit https://gerrit.wikimedia.org/r/145875 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I606048cca847ec4927e2a59c44d819dda067db3a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER <br...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits