From: <var...@us...> - 2021-02-23 18:00:49
|
Revision: 10273 http://sourceforge.net/p/phpwiki/code/10273 Author: vargenau Date: 2021-02-23 18:00:42 +0000 (Tue, 23 Feb 2021) Log Message: ----------- plugin Video: better test boolean argument "autoplay" Modified Paths: -------------- trunk/lib/plugin/Video.php Modified: trunk/lib/plugin/Video.php =================================================================== --- trunk/lib/plugin/Video.php 2021-02-23 17:56:45 UTC (rev 10272) +++ trunk/lib/plugin/Video.php 2021-02-23 18:00:42 UTC (rev 10273) @@ -80,6 +80,14 @@ $height = $args['height']; $autoplay = $args['autoplay']; + if (($autoplay == '0') || ($autoplay == 'false')) { + $autoplay = false; + } elseif (($autoplay == '1') || ($autoplay == 'true')) { + $autoplay = true; + } else { + return $this->error(sprintf(_("Argument '%s' must be a boolean"), "autoplay")); + } + if (!$url && !$file) { return $this->error(_("Both 'url' or 'file' parameters missing.")); } elseif ($url && $file) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |