Skip to content

Commit

Permalink
Decode file and line data from url
Browse files Browse the repository at this point in the history
  • Loading branch information
tacovandenbroek authored Apr 30, 2018
1 parent d7afc6b commit c7f62ef
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 c7f62ef

Please sign in to comment.