Permalink
Browse files

ENHANCEMENT If no arguments specified for cli-script.php/sake, then p…

…rovide a friendly message to the user on where to get help (from r100989)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111560 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 390d9b4 commit cb435df6af495710e72418f25a6019a3279e08fb @sminnee sminnee committed Oct 4, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 cli-script.php
View
@@ -65,7 +65,12 @@
DB::connect($databaseConfig);
// Get the request URL from the querystring arguments
-$url = $_SERVER['argv'][1];
+$url = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : null;
+if(!$url) {
+ echo 'Please specify an argument to cli-script.php/sake. For more information, visit http://doc.silverstripe.org/doku.php?id=sake';
+ die();
+}
+
$_SERVER['REQUEST_URI'] = BASE_URL . '/' . $url;
// Direct away - this is the "main" function, that hands control to the apporopriate controller

0 comments on commit cb435df

Please sign in to comment.