From dde16a1d665e56527874d10b179baa6a4164906e Mon Sep 17 00:00:00 2001 From: Andrey Izman Date: Thu, 9 Feb 2017 02:41:27 +0200 Subject: [PATCH] Add optional param domain to query() fix phalcon#12598 ref https://github.com/phalcon/cphalcon/pull/12600 --- phalcon/translate/adapter/gettext.zep | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/phalcon/translate/adapter/gettext.zep b/phalcon/translate/adapter/gettext.zep index ffe87e63e54..9111e2eba10 100644 --- a/phalcon/translate/adapter/gettext.zep +++ b/phalcon/translate/adapter/gettext.zep @@ -84,15 +84,9 @@ class Gettext extends Adapter implements \ArrayAccess * @param string domain * @return string */ - public function query(string! index, placeholders = null) -> string + public function query(string! index, placeholders = null, string! domain = null) -> string { - var translation, domain; - - let domain = null; - - if func_num_args() > 2 { - let domain = func_get_arg(2); - } + var translation; if !domain { let translation = gettext(index);