From 31f762e6e59337427d704612b76b871a794731b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Beli=C3=ABn?= Date: Fri, 28 Sep 2018 16:43:50 +0200 Subject: [PATCH] Fix issue with source and destination (1) Forgot to set insensitive case flag. --- src/ogr2ogr.php | 4 ++-- src/ogrinfo.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ogr2ogr.php b/src/ogr2ogr.php index c748230..ff179af 100644 --- a/src/ogr2ogr.php +++ b/src/ogr2ogr.php @@ -397,8 +397,8 @@ private function _setCommand() : string $this->_command = sprintf( 'ogr2ogr %s %s %s %s', $options, - preg_match('/^[a-z]{2,}:/', $this->_destination) === 1 ? $this->_destination : escapeshellarg($this->_destination), - preg_match('/^[a-z]{2,}:/', $this->_source) === 1 ? $this->_source : escapeshellarg($this->_source), + preg_match('/^[a-z]{2,}:/i', $this->_destination) === 1 ? $this->_destination : escapeshellarg($this->_destination), + preg_match('/^[a-z]{2,}:/i', $this->_source) === 1 ? $this->_source : escapeshellarg($this->_source), implode(' ', $this->_layers) ); diff --git a/src/ogrinfo.php b/src/ogrinfo.php index 7d443fa..f77c5e2 100644 --- a/src/ogrinfo.php +++ b/src/ogrinfo.php @@ -183,7 +183,7 @@ private function _setCommand() : string $this->_command = sprintf( 'ogrinfo %s %s %s', $options, - preg_match('/^[a-z]{2,}:/', $this->_source) === 1 ? $this->_source : escapeshellarg($this->_source), + preg_match('/^[a-z]{2,}:/i', $this->_source) === 1 ? $this->_source : escapeshellarg($this->_source), implode(' ', $this->_layers) );