From a94eb4084dfdc6a312f8888773ddd05e538155ab Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 13 May 2016 07:02:50 -0700 Subject: [PATCH] Emoticon parser PHP warning removal Issue #1633 --- e107_handlers/e_parse_class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index fc62238af..fd1c562e1 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -4617,11 +4617,11 @@ return $html; class e_emotefilter { - private $search; - private $replace; + private $search = array(); + private $replace = array(); public $emotes; - private $singleSearch; - private $singleReplace; + private $singleSearch = array(); + private $singleReplace = array(); function __construct() { @@ -4733,7 +4733,7 @@ class e_emotefilter return ''; } - if((strlen($text) < 12) && in_array($text, $this->singleSearch)) // just one emoticon with no space, line-break or html tags around it. + if(!empty($this->singleSearch) && (strlen($text) < 12) && in_array($text, $this->singleSearch)) // just one emoticon with no space, line-break or html tags around it. { return str_replace($this->singleSearch,$this->singleReplace,$text); }