Skip to content

Commit

Permalink
MINOR: Fixed a glitch that causes warnings in cli-script execution.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Minnee authored and chillu committed Jan 29, 2013
1 parent 55f3ec1 commit f72c77e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions control/Director.php
Expand Up @@ -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) {
Expand Down

0 comments on commit f72c77e

Please sign in to comment.