Fix compatibility with PHP 5.3

This commit is contained in:
Kijin Sung 2016-01-20 14:19:24 +09:00
parent 8e284db3b9
commit 9ddf2f54f3

View file

@ -162,7 +162,7 @@ function escape_dqstr($str)
function explode_with_escape($delimiter, $str, $limit = 0, $escape_char = '\\')
{
if ($limit < 1) $limit = null;
$result = [];
$result = array();
$split = preg_split('/(?<!' . preg_quote($escape_char, '/') . ')' . preg_quote($delimiter, '/') . '/', $str, $limit);
foreach ($split as $piece)
{