From 18e58171179468c878aa7e8ca4a9ca4e1d9667cf Mon Sep 17 00:00:00 2001 From: demsey2 Date: Thu, 17 Jan 2013 14:23:20 +0000 Subject: [PATCH 01/19] URI data is not available in the before filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit More info: http://forums.laravel.io/viewtopic.php?id=4458 --- laravel/routing/controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/laravel/routing/controller.php b/laravel/routing/controller.php index e81d6b5f..4e244948 100644 --- a/laravel/routing/controller.php +++ b/laravel/routing/controller.php @@ -276,7 +276,7 @@ abstract class Controller { // Again, as was the case with route closures, if the controller "before" // filters return a response, it will be considered the response to the // request and the controller method will not be used. - $response = Filter::run($filters, array(), true); + $response = Filter::run($filters, $parameters, true); if (is_null($response)) { @@ -439,4 +439,4 @@ abstract class Controller { } } -} \ No newline at end of file +} From 818be60551237e1c7fd2cc30891468b2180baab2 Mon Sep 17 00:00:00 2001 From: Matt Helm Date: Thu, 17 Jan 2013 16:11:18 -0500 Subject: [PATCH 02/19] Add Command alias to application configuration Signed-off-by: Matt Helm --- application/config/application.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/config/application.php b/application/config/application.php index 60735a60..8f21fd35 100755 --- a/application/config/application.php +++ b/application/config/application.php @@ -159,6 +159,7 @@ return array( 'Blade' => 'Laravel\\Blade', 'Bundle' => 'Laravel\\Bundle', 'Cache' => 'Laravel\\Cache', + 'Command' => 'Laravel\CLI\Command', 'Config' => 'Laravel\\Config', 'Controller' => 'Laravel\\Routing\\Controller', 'Cookie' => 'Laravel\\Cookie', From 5abb778b1656222ec68708bfb7be693fa50657fb Mon Sep 17 00:00:00 2001 From: frankwong Date: Tue, 22 Jan 2013 16:04:38 -0800 Subject: [PATCH 03/19] Added class and function information to log messages based on where the log message was initiated. --- laravel/log.php | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/laravel/log.php b/laravel/log.php index 88477a69..c7a9eadc 100644 --- a/laravel/log.php +++ b/laravel/log.php @@ -56,7 +56,31 @@ class Log { Event::fire('laravel.log', array($type, $message)); } - $message = static::format($type, $message); + $trace=debug_backtrace(); + + foreach($trace as $item) + { + if ($item['class'] == __CLASS__) + { + continue; + } + + $caller = $item; + + break; + } + + $function = $caller['function']; + if (isset($caller['class'])) + { + $class = $caller['class'] . '::'; + } + else + { + $class = ''; + } + + $message = static::format($type, $class . $function . ' - ' . $message); File::append(path('storage').'logs/'.date('Y-m-d').'.log', $message); } @@ -96,4 +120,4 @@ class Log { static::write($method, $parameters[0], $parameters[1]); } -} \ No newline at end of file +} From e48a2d723ba6b00131b2fbb406b3698663b97013 Mon Sep 17 00:00:00 2001 From: Matt Helm Date: Wed, 23 Jan 2013 10:19:44 -0500 Subject: [PATCH 04/19] Fix indentation and double slashes --- application/config/application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/config/application.php b/application/config/application.php index 8f21fd35..baf75d93 100755 --- a/application/config/application.php +++ b/application/config/application.php @@ -159,7 +159,7 @@ return array( 'Blade' => 'Laravel\\Blade', 'Bundle' => 'Laravel\\Bundle', 'Cache' => 'Laravel\\Cache', - 'Command' => 'Laravel\CLI\Command', + 'Command' => 'Laravel\\CLI\\Command', 'Config' => 'Laravel\\Config', 'Controller' => 'Laravel\\Routing\\Controller', 'Cookie' => 'Laravel\\Cookie', From 4cb904f44d24f856ec9c1040d2198ed8f009723b Mon Sep 17 00:00:00 2001 From: Matt Helm Date: Wed, 23 Jan 2013 10:23:39 -0500 Subject: [PATCH 05/19] Fix indentation and double slashes --- application/config/application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/config/application.php b/application/config/application.php index baf75d93..01e9d106 100755 --- a/application/config/application.php +++ b/application/config/application.php @@ -159,7 +159,7 @@ return array( 'Blade' => 'Laravel\\Blade', 'Bundle' => 'Laravel\\Bundle', 'Cache' => 'Laravel\\Cache', - 'Command' => 'Laravel\\CLI\\Command', + 'Command' => 'Laravel\\CLI\\Command', 'Config' => 'Laravel\\Config', 'Controller' => 'Laravel\\Routing\\Controller', 'Cookie' => 'Laravel\\Cookie', From 023e11e6917c6e9a287701fea3fd7433ed01d41a Mon Sep 17 00:00:00 2001 From: frankwong Date: Wed, 23 Jan 2013 20:56:48 -0800 Subject: [PATCH 06/19] Fixed bug where laravel is generating error log from outside of application classes. --- laravel/log.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/log.php b/laravel/log.php index c7a9eadc..40b9c12c 100644 --- a/laravel/log.php +++ b/laravel/log.php @@ -60,7 +60,7 @@ class Log { foreach($trace as $item) { - if ($item['class'] == __CLASS__) + if (isset($item['class']) AND $item['class'] == __CLASS__) { continue; } From 720480e74f854425ce9bb6a8d905a46c4c5381b5 Mon Sep 17 00:00:00 2001 From: Flavy Date: Fri, 1 Feb 2013 01:30:20 +0200 Subject: [PATCH 07/19] Added romanian language --- application/language/ro/pagination.php | 19 +++++ application/language/ro/validation.php | 106 +++++++++++++++++++++++++ 2 files changed, 125 insertions(+) create mode 100644 application/language/ro/pagination.php create mode 100644 application/language/ro/validation.php diff --git a/application/language/ro/pagination.php b/application/language/ro/pagination.php new file mode 100644 index 00000000..6a668f20 --- /dev/null +++ b/application/language/ro/pagination.php @@ -0,0 +1,19 @@ + '« Inapoi', + 'next' => 'Inainte »', + +); \ No newline at end of file diff --git a/application/language/ro/validation.php b/application/language/ro/validation.php new file mode 100644 index 00000000..52134a49 --- /dev/null +++ b/application/language/ro/validation.php @@ -0,0 +1,106 @@ + "Campul :attribute trebuie sa fie acceptat.", + "active_url" => "Campul :attribute nu este un URL valid.", + "after" => "Campul :attribute trebuie sa fie o data dupa :date.", + "alpha" => "Campul :attribute poate contine numai litere.", + "alpha_dash" => "Campul :attribute poate contine numai litere, numere si liniute.", + "alpha_num" => "Campul :attribute poate contine numai litere si numere.", + "array" => "Campul :attribute trebuie sa aiba elemente selectate.", + "before" => "Campul :attribute trebuie sa fie o data inainte de :date.", + "between" => array( + "numeric" => "Campul :attribute trebuie sa fie intre :min si :max.", + "file" => "Campul :attribute trebuie sa fie intre :min si :max kilobytes.", + "string" => "Campul :attribute trebuie sa fie intre :min si :max caractere.", + ), + "confirmed" => "Confirmarea :attribute nu se potriveste.", + "count" => "Campul :attribute trebuie sa aiba exact :count elemente selectate.", + "countbetween" => "Campul :attribute trebuie sa aiba intre :min si :max elemente selectate.", + "countmax" => "Campul :attribute trebuie sa aiba mai putin de :max elemente selectate.", + "countmin" => "Campul :attribute trebuie sa aiba cel putin :min elemente selectate.", + "date_format" => "Campul :attribute trebuie sa fie intr-un format valid.", + "different" => "Campurile :attribute si :other trebuie sa fie diferite.", + "email" => "Formatul campului :attribute este invalid.", + "exists" => "Campul :attribute selectat este invalid.", + "image" => "Campul :attribute trebuie sa fie o imagine.", + "in" => "Campul :attribute selectat este invalid.", + "integer" => "Campul :attribute trebuie sa fie un numar intreg.", + "ip" => "Campul :attribute trebuie sa fie o adresa IP valida.", + "match" => "Formatul campului :attribute este invalid.", + "max" => array( + "numeric" => "Campul :attribute trebuie sa fie mai mic de :max.", + "file" => "Campul :attribute trebuie sa fie mai mic de :max kilobytes.", + "string" => "Campul :attribute trebuie sa fie mai mic de :max caractere.", + ), + "mimes" => "Campul :attribute trebuie sa fie un fisier de tipul: :values.", + "min" => array( + "numeric" => "Campul :attribute trebuie sa fie cel putin :min.", + "file" => "Campul :attribute trebuie sa aiba cel putin :min kilobytes.", + "string" => "Campul :attribute trebuie sa aiba cel putin :min caractere.", + ), + "not_in" => "Campul :attribute selectat este invalid.", + "numeric" => "Campul :attribute trebuie sa fie un numar.", + "required" => "Campul :attribute este obligatoriu.", + "required_with" => "Campul :attribute este obligatoriu cu :field", + "same" => "Campul :attribute si :other trebuie sa fie identice.", + "size" => array( + "numeric" => "Campul :attribute trebuie sa fie :size.", + "file" => "Campul :attribute trebuie sa aiba :size kilobyte.", + "string" => "Campul :attribute trebuie sa aiba :size caractere.", + ), + "unique" => "Campul :attribute a fost deja folosit.", + "url" => "Campul :attribute nu este intr-un format valid.", + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute_rule" to name the lines. This helps keep your + | custom validation clean and tidy. + | + | So, say you want to use a custom validation message when validating that + | the "email" attribute is unique. Just add "email_unique" to this array + | with your custom message. The Validator will handle the rest! + | + */ + + 'custom' => array(), + + /* + |-------------------------------------------------------------------------- + | Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as "E-Mail Address" instead + | of "email". Your users will thank you. + | + | The Validator class will automatically search this array of lines it + | is attempting to replace the :attribute place-holder in messages. + | It's pretty slick. We think you'll like it. + | + */ + + 'attributes' => array(), + +); From a2cafaa367b07bd4d7dde22f3d1aa7b7d3c52219 Mon Sep 17 00:00:00 2001 From: Pavel Puchkin Date: Fri, 1 Feb 2013 11:10:02 +1100 Subject: [PATCH 08/19] Fix bug in ANBU that cause wrong total time showing on Queries tab When query time is larger than one second 'array_sum' cannot convert it to float right. Also, it is better to fire 'laravel.query' event with raw time as an argument rather than its string representation --- laravel/database/connection.php | 2 +- laravel/profiling/template.blade.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/laravel/database/connection.php b/laravel/database/connection.php index b238aa9e..e765065d 100644 --- a/laravel/database/connection.php +++ b/laravel/database/connection.php @@ -308,7 +308,7 @@ class Connection { */ protected function log($sql, $bindings, $start) { - $time = number_format((microtime(true) - $start) * 1000, 2); + $time = (microtime(true) - $start) * 1000; Event::fire('laravel.query', array($sql, $bindings, $time)); diff --git a/laravel/profiling/template.blade.php b/laravel/profiling/template.blade.php index 9c855b43..d8b36ff7 100755 --- a/laravel/profiling/template.blade.php +++ b/laravel/profiling/template.blade.php @@ -36,7 +36,7 @@ @foreach ($queries as $query) - {{ $query[1] }}ms + {{ number_format($query[1], 2) }}ms
{{ $query[0] }}
@@ -103,7 +103,7 @@ SQL {{ count($queries) }} @if (count($queries)) - {{ array_sum(array_map(function($q) { return $q[1]; }, $queries)) }}ms + {{ number_format(array_sum(array_pluck($queries, '1')), 2) }}ms @endif From f93dfccd21372bd963f6d3ea1da486731eba8b6a Mon Sep 17 00:00:00 2001 From: Chris How Date: Sun, 3 Feb 2013 19:15:55 +0100 Subject: [PATCH 09/19] HTML::entities() now optional on label contents --- laravel/form.php | 6 ++++-- laravel/tests/cases/form.test.php | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/laravel/form.php b/laravel/form.php index 5a450b52..d14cad69 100644 --- a/laravel/form.php +++ b/laravel/form.php @@ -182,13 +182,15 @@ class Form { * @param array $attributes * @return string */ - public static function label($name, $value, $attributes = array()) + public static function label($name, $value, $attributes = array(), $escape_html = true) { static::$labels[] = $name; $attributes = HTML::attributes($attributes); - $value = HTML::entities($value); + if ($escape_html) { + $value = HTML::entities($value); + } return ''; } diff --git a/laravel/tests/cases/form.test.php b/laravel/tests/cases/form.test.php index 5f6f7fa3..8791dfd1 100644 --- a/laravel/tests/cases/form.test.php +++ b/laravel/tests/cases/form.test.php @@ -111,9 +111,11 @@ class FormTest extends PHPUnit_Framework_TestCase { { $form1 = Form::label('foo', 'Foobar'); $form2 = Form::label('foo', 'Foobar', array('class' => 'control-label')); + $form3 = Form::label('foo', 'Foobar baz', null, false); $this->assertEquals('', $form1); $this->assertEquals('', $form2); + $this->assertEquals('', $form3); } /** From 87c588c6104a4e218db17f32958cf825361517b5 Mon Sep 17 00:00:00 2001 From: Chris How Date: Sun, 3 Feb 2013 19:34:13 +0100 Subject: [PATCH 10/19] Updated docs --- laravel/documentation/views/forms.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/laravel/documentation/views/forms.md b/laravel/documentation/views/forms.md index cee6287a..538fd935 100644 --- a/laravel/documentation/views/forms.md +++ b/laravel/documentation/views/forms.md @@ -83,6 +83,14 @@ Laravel provides an easy method of protecting your application from cross-site r echo Form::label('email', 'E-Mail Address', array('class' => 'awesome')); +#### Turning off HTML escaping of label contents: + + echo Form::label('confirm', 'Are you sure you want to proceed?', null, false); + +You can pass ```false``` as the optional fourth argument to disable automatic HTML escaping of the label content. + + + > **Note:** After creating a label, any form element you create with a name matching the label name will automatically receive an ID matching the label name as well. From 068ddef312071248cf54b67ad9b587109c43b4f5 Mon Sep 17 00:00:00 2001 From: Tz-Huan Huang Date: Wed, 6 Feb 2013 13:35:03 +0800 Subject: [PATCH 11/19] Update laravel/session/drivers/cookie.php --- laravel/session/drivers/cookie.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/laravel/session/drivers/cookie.php b/laravel/session/drivers/cookie.php index 63a60eec..9e75354c 100644 --- a/laravel/session/drivers/cookie.php +++ b/laravel/session/drivers/cookie.php @@ -39,7 +39,7 @@ class Cookie extends Driver { $payload = Crypter::encrypt(serialize($session)); - C::put(Cookie::payload, $payload, $lifetime, $path, $domain); + C::put(Cookie::payload, $payload, $lifetime, $path, $domain, $secure); } /** @@ -53,4 +53,4 @@ class Cookie extends Driver { C::forget(Cookie::payload); } -} \ No newline at end of file +} From 2144637e128f8dc2f6e4d9b062a622b4dfe29e4f Mon Sep 17 00:00:00 2001 From: Pasvaz Date: Thu, 7 Feb 2013 03:35:42 +0100 Subject: [PATCH 12/19] Handles Redis password If password is set in the config (database.php), before to issue any command it starts the Auth process, otherwise it starts with SELECT as usuale. --- laravel/redis.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/laravel/redis.php b/laravel/redis.php index 02267d32..516f5aac 100644 --- a/laravel/redis.php +++ b/laravel/redis.php @@ -16,6 +16,13 @@ class Redis { */ protected $port; + /** + * The database password, if present. + * + * @var string + */ + protected $password; + /** * The database number the connection selects on load. * @@ -45,10 +52,11 @@ class Redis { * @param int $database * @return void */ - public function __construct($host, $port, $database = 0) + public function __construct($host, $port, $password = null, $database = 0) { $this->host = $host; $this->port = $port; + $this->password = $password; $this->database = $database; } @@ -79,7 +87,12 @@ class Redis { extract($config); - static::$databases[$name] = new static($host, $port, $database); + if ( ! isset($password)) + { + $password = null; + } + + static::$databases[$name] = new static($host, $port, $password, $database); } return static::$databases[$name]; @@ -153,6 +166,11 @@ class Redis { throw new \Exception("Error making Redis connection: {$error} - {$message}"); } + if ( $this->password ) + { + $this->auth($this->password); + } + $this->select($this->database); return $this->connection; From 8e2784071890cb9e6bdeb1b985225962b76c2edc Mon Sep 17 00:00:00 2001 From: aditya Date: Fri, 8 Feb 2013 05:12:06 +0530 Subject: [PATCH 13/19] (Very) minor typo fix. --- laravel/documentation/database/eloquent.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/documentation/database/eloquent.md b/laravel/documentation/database/eloquent.md index 81a9973f..fa4916cb 100644 --- a/laravel/documentation/database/eloquent.md +++ b/laravel/documentation/database/eloquent.md @@ -284,7 +284,7 @@ Or, as usual, you may retrieve the relationship through the dynamic roles proper $roles = User::find(1)->roles; -If your table names don't follow conventions, simply pass the table name in the second parameter to the **has\_and\_belongs\_to\_many** method: +If your table names don't follow conventions, simply pass the table name in the second parameter to the **has\_many\_and\_belongs\_to** method: class User extends Eloquent { From 43afc7b9fac2fba5852e06bd03e82af393a14197 Mon Sep 17 00:00:00 2001 From: Dave Clayton Date: Tue, 12 Feb 2013 14:54:13 +0100 Subject: [PATCH 14/19] Made how to do AND WHERE in fluent more explicit in the docs --- laravel/documentation/database/fluent.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/laravel/documentation/database/fluent.md b/laravel/documentation/database/fluent.md index 307488ea..adede66e 100644 --- a/laravel/documentation/database/fluent.md +++ b/laravel/documentation/database/fluent.md @@ -76,6 +76,13 @@ There are a variety of methods to assist you in building where clauses. The most ->or_where('email', '=', 'example@gmail.com') ->first(); +To do the equivalent of an AND where, simply chain the query with another where: + + return DB::table('users') + ->where('id', '=', 1) + ->where('activated', '=', 1) + ->first(); + Of course, you are not limited to simply checking equality. You may also use **greater-than**, **less-than**, **not-equal**, and **like**: return DB::table('users') From bc36205a99826193da0a26d564d37cfb93661c2b Mon Sep 17 00:00:00 2001 From: Kirk Bushell Date: Fri, 15 Feb 2013 09:50:32 +1100 Subject: [PATCH 15/19] Updated error class to pass the Exception for the 500 triggered event. --- application/routes.php | 5 +++-- laravel/error.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/application/routes.php b/application/routes.php index 2892da90..06547e0f 100644 --- a/application/routes.php +++ b/application/routes.php @@ -48,7 +48,8 @@ Route::get('/', function() | | Similarly, we use an event to handle the display of 500 level errors | within the application. These errors are fired when there is an -| uncaught exception thrown in the application. +| uncaught exception thrown in the application. The exception object +| that is captured during execution is then passed to the 500 listener. | */ @@ -57,7 +58,7 @@ Event::listen('404', function() return Response::error('404'); }); -Event::listen('500', function() +Event::listen('500', function($exception) { return Response::error('500'); }); diff --git a/laravel/error.php b/laravel/error.php index c4c1ac6b..7de0919a 100644 --- a/laravel/error.php +++ b/laravel/error.php @@ -54,7 +54,7 @@ class Error { // Using events gives the developer more freedom. else { - $response = Event::first('500'); + $response = Event::first('500', $exception); $response = Response::prepare($response); } From 9003957b285b5ba3d22faef481f5a14875fa4e2e Mon Sep 17 00:00:00 2001 From: Pavel Puchkin Date: Mon, 18 Feb 2013 15:18:10 +1100 Subject: [PATCH 16/19] One more fix about custom query grammar --- laravel/database/connection.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/laravel/database/connection.php b/laravel/database/connection.php index 938ae97f..2bde9584 100644 --- a/laravel/database/connection.php +++ b/laravel/database/connection.php @@ -75,7 +75,8 @@ class Connection { if (isset(\Laravel\Database::$registrar[$this->driver()])) { - return $this->grammar = \Laravel\Database::$registrar[$this->driver()]['query'](); + $resolver = \Laravel\Database::$registrar[$this->driver()]['query']; + return $this->grammar = $resolver($this); } switch ($this->driver()) From 31e21971a0fbaad823c7cb7247f71446a7b3b595 Mon Sep 17 00:00:00 2001 From: Duru Can Celasun Date: Wed, 20 Feb 2013 09:17:59 +0200 Subject: [PATCH 17/19] Add flushing support to the Redis cache driver --- laravel/cache/drivers/redis.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/laravel/cache/drivers/redis.php b/laravel/cache/drivers/redis.php index 3195566c..f0a71d07 100644 --- a/laravel/cache/drivers/redis.php +++ b/laravel/cache/drivers/redis.php @@ -87,5 +87,15 @@ class Redis extends Driver { { $this->redis->del($key); } + + /** + * Flush the entire cache. + * + * @return void + */ + public function flush() + { + $this->redis->flushdb(); + } -} \ No newline at end of file +} From eccd8375db0b8dae8b0ad53cc416e230ae164bc9 Mon Sep 17 00:00:00 2001 From: David Mosher Date: Tue, 26 Feb 2013 09:00:52 -0800 Subject: [PATCH 18/19] Combined @imports in style.css MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes extraneous http request from style.css --- public/laravel/css/style.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/laravel/css/style.css b/public/laravel/css/style.css index d3333c94..f073bf19 100755 --- a/public/laravel/css/style.css +++ b/public/laravel/css/style.css @@ -1,5 +1,4 @@ -@import url(http://fonts.googleapis.com/css?family=Ubuntu); -@import url(http://fonts.googleapis.com/css?family=Droid+Sans); +@import url(http://fonts.googleapis.com/css?family=Ubuntu|Droid+Sans); article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; } audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; } From 5929f8e537779a211c829654afe46ad9d8eaecae Mon Sep 17 00:00:00 2001 From: David Lin Date: Wed, 27 Feb 2013 08:54:57 +0800 Subject: [PATCH 19/19] Update laravel/request.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When running nginx with php-cgi (Fast-CGI):  spawn-fcgi -a 127.0.0.1 -p 10081 -C 50 -u nobody -f /usr/local/php5317/bin/php-cgi The Request::cli() method will determine the web request as run from the command line. Add ` PHP_SAPI != "cgi-fcgi" ` to resolve it. --- laravel/request.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/laravel/request.php b/laravel/request.php index 0193776e..7cf85d69 100644 --- a/laravel/request.php +++ b/laravel/request.php @@ -196,7 +196,7 @@ class Request { */ public static function cli() { - return defined('STDIN') || (substr(PHP_SAPI, 0, 3) == 'cgi' && getenv('TERM')); + return defined('STDIN') || (PHP_SAPI != "cgi-fcgi" && substr(PHP_SAPI, 0, 3) == 'cgi' && getenv('TERM')); } /** @@ -287,4 +287,4 @@ class Request { return call_user_func_array(array(static::foundation(), $method), $parameters); } -} \ No newline at end of file +}