original_string: protected function logStatementError($error,$sql=null) {
  		if (!empty($GLOBALS['config']['DB_DEBUG'])) {
  			$message = "Error with query - CODE: {$error[1]}";
  			if ($sql) {
  				$message .= " QUERY: {$sql}";
  			}
  			$this->getLogger()->error($message);
  		}
  	}
code: protected function logStatementError($error,$sql=null) {
  		if (!empty($GLOBALS['config']['DB_DEBUG'])) {
  			$message = "Error with query - CODE: {$error[1]}";
  			if ($sql) {
  				$message .= " QUERY: {$sql}";
  			}
  			$this->getLogger()->error($message);
  		}
  	}
code_tokens: protected function logStatementError ( $ error , $ sql = null ) { if ( ! empty ( $ GLOBALS [ 'config' ] [ 'DB_DEBUG' ] ) ) { $ message = "Error with query - CODE: {$error[1]}" ; if ( $ sql ) { $ message .= " QUERY: {$sql}" ; } $ this -> getLogger ( ) -> error ( $ message ) ; } }
docstring: Logs SQL errors to the logger
  @param array $error A PDO::errorInfo() error
  @param string $sql The SQL query that triggered the error
docstring_tokens: Logs SQL errors to the logger