From 12405542ae15ab566a8a53fa19c310b39ecb251d Mon Sep 17 00:00:00 2001 From: Julien Mathis <jmathis@merethis.com> Date: Tue, 5 Apr 2011 17:49:24 +0000 Subject: [PATCH] fix syntax problem with preg_split git-svn-id: http://svn.centreon.com/trunk/centreon@12030 6bcd3966-0018-0410-8128-fd23d134de7e --- GPL_LIB/Smarty/libs/plugins/function.fetch.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GPL_LIB/Smarty/libs/plugins/function.fetch.php b/GPL_LIB/Smarty/libs/plugins/function.fetch.php index 0539ddabc6..7cd590cc2e 100644 --- a/GPL_LIB/Smarty/libs/plugins/function.fetch.php +++ b/GPL_LIB/Smarty/libs/plugins/function.fetch.php @@ -35,7 +35,7 @@ function smarty_function_fetch($params, &$smarty) $smarty->_trigger_fatal_error('[plugin] (secure mode) fetch \'' . $params['file'] . '\' is not allowed'); return; } - + // fetch the file if($fp = @fopen($params['file'],'r')) { while(!feof($fp)) { @@ -181,12 +181,12 @@ function smarty_function_fetch($params, &$smarty) $content .= fgets($fp,4096); } fclose($fp); - $cpreg_split = preg_split("\r\n\r\n",$content,2); + $csplit = split("\r\n\r\n",$content,2); - $content = $cpreg_split[1]; + $content = $csplit[1]; if(!empty($params['assign_headers'])) { - $smarty->assign($params['assign_headers'],preg_split("\r\n",$cpreg_split[0])); + $smarty->assign($params['assign_headers'],split("\r\n",$csplit[0])); } } } else { -- GitLab