Procházet zdrojové kódy

Fix for PHP 7.3

The PHP7.3 was not handling the single line regex
ahwelp před 6 roky
rodič
revize
e7d986095c
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      src/ORM/DBInstance.php

+ 2 - 1
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') {