From e76523fab9bbe1cd3b61bc294548c7a5309ba5f0 Mon Sep 17 00:00:00 2001 From: MaksSlesarenko Date: Tue, 12 Aug 2014 15:39:31 +0300 Subject: [PATCH] fix warning when parsing __($var) --- Gettext/Extractors/PhpCode.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Gettext/Extractors/PhpCode.php b/Gettext/Extractors/PhpCode.php index fb50b5ba..c3892501 100644 --- a/Gettext/Extractors/PhpCode.php +++ b/Gettext/Extractors/PhpCode.php @@ -71,6 +71,10 @@ public static function parse($file, Entries $entries) } $line = array_shift($args); + + if (!isset($args[0])) { + continue; + } switch (self::$functions[$function]) { case '__':