Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
Fix issue with source and destination (1)
Browse files Browse the repository at this point in the history
Forgot to set insensitive case flag.
  • Loading branch information
jbelien committed Sep 28, 2018
1 parent bb20803 commit 31f762e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ogr2ogr.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);

Expand Down
2 changes: 1 addition & 1 deletion src/ogrinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);

Expand Down

0 comments on commit 31f762e

Please sign in to comment.