Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #15 from chernjie/master

Improved PHP_SELF check for CLI
  • Loading branch information...
commit fc862f916f49edcb7f003e73287f9d946f42fa48 2 parents 450fd7b + 2567d82
Vlad Andersen authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  Spyc.php
2  Spyc.php
View
@@ -1036,7 +1036,7 @@ private function stripGroup ($line, $group) {
do {
if (PHP_SAPI != 'cli') break;
if (empty ($_SERVER['argc']) || $_SERVER['argc'] < 2) break;
- if (empty ($_SERVER['PHP_SELF']) || $_SERVER['PHP_SELF'] != 'Spyc.php') break;
+ if (empty ($_SERVER['PHP_SELF']) || FALSE === strpos ($_SERVER['PHP_SELF'], 'Spyc.php') ) break;
$file = $argv[1];
echo json_encode (spyc_load_file ($file));
} while (0);
Please sign in to comment.
Something went wrong with that request. Please try again.