Permalink
Browse files

MINOR: Fixed a glitch that causes warnings in cli-script execution.

  • Loading branch information...
1 parent 55f3ec1 commit f72c77e984d1f71e1ae6016533d0a09146da72a8 @sminnee sminnee committed with chillu Mar 31, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 control/Director.php
View
3 control/Director.php
@@ -725,6 +725,9 @@ public static function forceSSL($patterns = null) {
$matched = false;
if($patterns) {
+ // Calling from the command-line?
+ if(!isset($_SERVER['REQUEST_URI'])) return;
+
// protect portions of the site based on the pattern
$relativeURL = self::makeRelative(Director::absoluteURL($_SERVER['REQUEST_URI']));
foreach($patterns as $pattern) {

0 comments on commit f72c77e

Please sign in to comment.