Permalink
Browse files

Make EmbedVideo.hooks OK with E_STRICT

Doing `$foo = $bar['zar']; if (isset($foo)) {}' is a warning under
E_STRICT. fix it to check `$bar['zar']' first.

Withotu this patch EmbedVideo.hooks.php would warn like this:

    PHP Notice:  Undefined index: extern in .../EmbedVideo.hooks.php on line 109
  • Loading branch information...
1 parent a1324a3 commit 8d4627447b63273b2c52ff5e464cc96a8e8b9f70 @avar committed Jul 7, 2010
Showing with 2 additions and 3 deletions.
  1. +2 −3 EmbedVideo.hooks.php
View
@@ -103,9 +103,8 @@ public static function parserFunction_ev($parser, $service = null, $id = null, $
return EmbedVideo::errBadID($service, $id);
# if the service has it's own custom extern declaration, use that instead
- $clause = $entry['extern'];
- if (isset($clause)) {
- $clause = wfMsgReplaceArgs($clause, array($wgScriptPath, $id, $width, $height));
+ if (isset($entry['extern'])) {
+ $clause = wfMsgReplaceArgs($entry['extern'], array($wgScriptPath, $id, $width, $height));
if ($hasalign)
$clause = EmbedVideo::generateAlignExternClause($clause, $align, $desc, $width, $height);
return array($clause, 'noparse' => true, 'isHTML' => true);

0 comments on commit 8d46274

Please sign in to comment.