From e7d986095c6a7838821628a2187b09dd69b3ea44 Mon Sep 17 00:00:00 2001 From: ahwelp Date: Tue, 9 Jul 2019 04:35:44 +0000 Subject: [PATCH] Fix for PHP 7.3 The PHP7.3 was not handling the single line regex --- src/ORM/DBInstance.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ORM/DBInstance.php b/src/ORM/DBInstance.php index fad47f5..66c877a 100755 --- a/src/ORM/DBInstance.php +++ b/src/ORM/DBInstance.php @@ -6,8 +6,9 @@ class DBInstance { private static function addPrefix($sql, $instance = 'default'){ $con = Connections::getConnection($instance); + $sql = preg_replace('/{(.*)}/', "$con->prefix$1", $sql); $sql = preg_replace( "/\r|\n/", "", $sql ); - return preg_replace('/{(.*)}/', "$con->prefix$1", $sql); + return $sql; } public static function execute($sql, $data = null, $instance = 'default') {