From 8248dad50adc68f4009ea3cdac7cc50be6f23a26 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sat, 29 Apr 2017 19:48:52 +0200 Subject: [PATCH] Misc/Errors * fixes some notices from log * fixed error when handling cookies --- includes/ajaxHandler/cookie.class.php | 2 +- includes/basetype.class.php | 2 +- pages/currency.php | 2 +- template/pages/detail-page-generic.tpl.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/ajaxHandler/cookie.class.php b/includes/ajaxHandler/cookie.class.php index c2f340e5..a1ac8b81 100644 --- a/includes/ajaxHandler/cookie.class.php +++ b/includes/ajaxHandler/cookie.class.php @@ -12,7 +12,7 @@ class AjaxCookie extends AjaxHandler return; $this->_get = array( - this->params[0] => [FILTER_SANITIZE_STRING, 0xC], // FILTER_FLAG_STRIP_LOW | *_HIGH + $this->params[0] => [FILTER_SANITIZE_STRING, 0xC], // FILTER_FLAG_STRIP_LOW | *_HIGH ); // NOW we know, what to expect and sanitize diff --git a/includes/basetype.class.php b/includes/basetype.class.php index c01dfb22..405b10d7 100644 --- a/includes/basetype.class.php +++ b/includes/basetype.class.php @@ -713,7 +713,7 @@ trait spawnHelper public function getSpawns($mode) { // only Creatures, GOs and SoundEmitters can be spawned - if (!self::$type || (self::$type != TYPE_NPC && self::$type != TYPE_OBJECT && self::$type != TYPE_SOUND)) + if (!self::$type || !$this->getfoundIDs() || (self::$type != TYPE_NPC && self::$type != TYPE_OBJECT && self::$type != TYPE_SOUND)) return []; switch ($mode) diff --git a/pages/currency.php b/pages/currency.php index 78e3d088..beea3502 100644 --- a/pages/currency.php +++ b/pages/currency.php @@ -54,7 +54,7 @@ class CurrencyPage extends GenericPage /* Infobox */ /**********/ - $infobox = Lang::getInfoBoxForFlags($this->subject->getField('cuFlags')); + $infobox = Lang::getInfoBoxForFlags(intval($this->subject->getField('cuFlags'))); if ($_ = $this->subject->getField('cap')) $infobox[] = Lang::currency('cap').Lang::main('colon').Lang::nf($_); diff --git a/template/pages/detail-page-generic.tpl.php b/template/pages/detail-page-generic.tpl.php index c229417f..26406f1f 100644 --- a/template/pages/detail-page-generic.tpl.php +++ b/template/pages/detail-page-generic.tpl.php @@ -44,7 +44,7 @@ if (!empty($this->transfer)): echo "
\n ".$this->transfer."\n"; endif; -if ($this->zoneMusic): +if (!empty($this->zoneMusic)): ?>