Skip to content

Commit

Permalink
Merge pull request #23 from tacovandenbroek/urldecode-file-and-line
Browse files Browse the repository at this point in the history
Decode file and line data from url
  • Loading branch information
langemeijer authored Apr 30, 2018
2 parents d7afc6b + c7f62ef commit ee3989d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phpstorm.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

if ($argc === 2 && preg_match('(^phpstorm:\/\/open\?file=(.*)\&line=([0-9]+)\/?$)', $argv[1], $matches)) {

$fileName = escapeshellarg($matches[1]);
$lineNumber = escapeshellarg($matches[2]);
$fileName = escapeshellarg(urldecode($matches[1]));
$lineNumber = escapeshellarg(urldecode($matches[2]));

system("/opt/PhpStorm/bin/phpstorm.sh --line " . $lineNumber . " " . $fileName);
} else {
Expand Down

0 comments on commit ee3989d

Please sign in to comment.