From ac32f95da17a8ec93cd609c83471f09b3eccc6b1 Mon Sep 17 00:00:00 2001 From: Ridho Muhammad Date: Wed, 16 Mar 2016 22:03:16 +0700 Subject: [PATCH] Added files via upload Update geshi.php with php7 fix --- htdocs/application/libraries/geshi/geshi.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/application/libraries/geshi/geshi.php b/htdocs/application/libraries/geshi/geshi.php index 405ff16..0cc4f29 100644 --- a/htdocs/application/libraries/geshi/geshi.php +++ b/htdocs/application/libraries/geshi/geshi.php @@ -594,11 +594,11 @@ class GeSHi { * {@link GeSHi->set_language_path()} * @since 1.0.0 */ - function GeSHi($source = '', $language = '', $path = '') { - if (!empty($source)) { + function __construct($source = '', $language = '', $path = '') { + if ( is_string($source) && ($source !== '') ) { $this->set_source($source); } - if (!empty($language)) { + if ( is_string($language) && ($language !== '') ) { $this->set_language($language); } $this->set_language_path($path); @@ -2151,7 +2151,7 @@ class GeSHi { } $this->language_data['NUMBERS_RXCACHE'][$key] = - "/(?)($regexp)(?!(?:|(?>[^\<]))+>)(?![^<]*>)(?!\|>)(?!\/>)/i"; // + "/(?)($regexp)(?!(?:|(?>[^\<]))+>)(?![^<]*>)(?!\|>)(?!\/>)/i"; } if(!isset($this->language_data['PARSER_CONTROL']['NUMBERS']['PRECHECK_RX'])) {