Found error in preg_replace that causes it to display error instead of zend result