Changing prefixing substitution method
This commit is contained in:
@@ -86,7 +86,9 @@ class Wrapper
|
|||||||
{
|
{
|
||||||
$instance = self::getInstance();
|
$instance = self::getInstance();
|
||||||
$prefix = $instance->_adapter->getConnection()->prefix;
|
$prefix = $instance->_adapter->getConnection()->prefix;
|
||||||
$sql = preg_replace('/{.*?}/', "$prefix$1", $sql);
|
$sql = preg_replace_callback('/{.*?}/', function($match) use ($prefix){
|
||||||
|
return str_replace('}', '', str_replace('{', $prefix, $match[0]));
|
||||||
|
} , $sql);
|
||||||
$instance->_driver->exec($sql);
|
$instance->_driver->exec($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user