This is my code.
private function _checkMatch($modFilePath, $checkFilePath) {
$modFilePath = str_replace('\\', '/', $modFilePath);
$checkFilePath = str_replace('\\', '/', $checkFilePath);
$modFilePath = preg_replace('/([^*]+)/e', 'preg_quote("$1", "~")', $modFilePath);
$modFilePath = str_replace('*', '[^/]*', $modFilePath);
$return = (bool) preg_match('~^' . $modFilePath . '$~', $checkFilePath);
return $return;
}
I changed preg_replace to preg_replace_callback but it is giving me the following error.
Warning: preg_replace_callback(): Requires argument 2, 'preg_quote("$1", "~")', to be a valid callback
I'm currently using opencart version 1.x.x
Any one can help me out?