diff --git a/e107_handlers/application.php b/e107_handlers/application.php index c65cdd2bc..da06797f2 100644 --- a/e107_handlers/application.php +++ b/e107_handlers/application.php @@ -309,7 +309,7 @@ class eFront { if(null !== $status) { - if($status[0] === '{') + if(!empty($status[0]) && ($status[0] === '{')) { $status = e107::getParser()->replaceConstants($status); } @@ -3585,9 +3585,17 @@ class eRequest { $qstring = self::getQueryString(); } - - define("e_SELF", e_REQUEST_SELF); - define("e_QUERY", $qstring); + + if(!defined('e_SELF')) + { + define("e_SELF", e_REQUEST_SELF); + } + + if(!defined('e_QUERY')) + { + define("e_QUERY", $qstring); + } + $_SERVER['QUERY_STRING'] = e_QUERY; if(strpos(e_QUERY,"=")!==false ) // Fix for legacyQuery using $_GET ie. ?x=y&z=1 etc. diff --git a/e107_handlers/mysql_class.php b/e107_handlers/mysql_class.php index 7ee874ed2..d6acaf95a 100644 --- a/e107_handlers/mysql_class.php +++ b/e107_handlers/mysql_class.php @@ -622,7 +622,8 @@ class e_db_mysql { return null; } - return array_shift($this->fetch()); + $rows = $this->fetch(); + return array_shift($rows); break; case 'one': diff --git a/e107_plugins/gallery/e_shortcode.php b/e107_plugins/gallery/e_shortcode.php index 11c60de18..2a06deced 100644 --- a/e107_plugins/gallery/e_shortcode.php +++ b/e107_plugins/gallery/e_shortcode.php @@ -158,7 +158,7 @@ class gallery_shortcodes extends e_shortcode // we passs both fields, the router will convert one of them to 'cat' variable, based on the current URL config $url = 'route::gallery/index/list?media_cat_category='.$this->curCat.'--AMP--media_cat_sef='.$this->var['media_cat_sef'].'--AMP--frm=--FROM--::full=1'; $parm = 'total='.$this->total.'&amount='.$this->amount.'¤t='.$this->from.'&url='.rawurlencode($url); // .'&url='.$url; - $text .= e107::getParser()->parseTemplate("{NEXTPREV=".$parm."}"); + $text = e107::getParser()->parseTemplate("{NEXTPREV=".$parm."}"); return $text; }