From cf753d16de03939c146fc3dbb1fc4560b7ad52d0 Mon Sep 17 00:00:00 2001 From: MaksSlesarenko Date: Thu, 14 Aug 2014 13:30:18 +0300 Subject: [PATCH] fix warning when parsing p__('context', $var) --- Gettext/Extractors/PhpCode.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Gettext/Extractors/PhpCode.php b/Gettext/Extractors/PhpCode.php index c3892501..416a62fd 100644 --- a/Gettext/Extractors/PhpCode.php +++ b/Gettext/Extractors/PhpCode.php @@ -75,6 +75,9 @@ public static function parse($file, Entries $entries) if (!isset($args[0])) { continue; } + if (in_array(self::$functions[$function], array('p__', 'n__')) && !isset($args[1])) { + continue; + } switch (self::$functions[$function]) { case '__':