Skip to content

Commit ae5331b

Browse files
committed
Merge branch 'staging'
2 parents 439f9c8 + 4de8e2d commit ae5331b

File tree

13 files changed

+380
-31
lines changed

13 files changed

+380
-31
lines changed

artisan

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Laravel - A PHP Framework For Web Artisans
55
*
66
* @package Laravel
7-
* @version 3.2.8
7+
* @version 3.2.9
88
* @author Taylor Otwell <taylorotwell@gmail.com>
99
* @link http://laravel.com
1010
*/

laravel/auth/drivers/driver.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ public function logout()
127127
$this->cookie($this->recaller(), null, -2000);
128128

129129
Session::forget($this->token());
130+
131+
$this->token = null;
130132
}
131133

132134
/**

laravel/database/eloquent/model.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ public function get_dirty()
528528

529529
foreach ($this->attributes as $key => $value)
530530
{
531-
if ( ! isset($this->original[$key]) or $value !== $this->original[$key])
531+
if ( ! array_key_exists($key, $this->original) or $value != $this->original[$key])
532532
{
533533
$dirty[$key] = $value;
534534
}
@@ -544,7 +544,7 @@ public function get_dirty()
544544
*/
545545
public function get_key()
546546
{
547-
return $this->get_attribute(static::$key);
547+
return array_get($this->original, static::$key);
548548
}
549549

550550
/**
@@ -721,7 +721,7 @@ public function __isset($key)
721721
{
722722
if (array_key_exists($key, $this->$source)) return true;
723723
}
724-
724+
725725
if (method_exists($this, $key)) return true;
726726
}
727727

laravel/documentation/changes.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Contents
44

5+
- [Laravel 3.2.9](#3.2.9)
6+
- [Upgrading From 3.2.8](#upgrade-3.2.9)
57
- [Laravel 3.2.8](#3.2.8)
68
- [Upgrading From 3.2.7](#upgrade-3.2.8)
79
- [Laravel 3.2.7](#3.2.7)
@@ -41,6 +43,17 @@
4143
- [Laravel 3.1](#3.1)
4244
- [Upgrading From 3.0](#upgrade-3.1)
4345

46+
<a name="3.2.9"></a>
47+
## Laravel 3.2.9
48+
49+
- Always log exceptions even when there are "logger" event listeners.
50+
- Fix nasty view exception messages.
51+
52+
<a name="upgrade-3.2.9"></a>
53+
### Upgrading From 3.2.8
54+
55+
- Replace the **laravel** folder.
56+
4457
<a name="3.2.8"></a>
4558
## Laravel 3.2.8
4659

laravel/error.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,28 @@ public static function exception($exception, $trace = true)
1515

1616
ob_get_level() and ob_end_clean();
1717

18+
$message = $exception->getMessage();
19+
20+
// For Laravel view errors we want to show a prettier error:
21+
$file = $exception->getFile();
22+
23+
if (str_contains($exception->getFile(), 'eval()') and str_contains($exception->getFile(), 'laravel/view.php'))
24+
{
25+
$message = 'Error rendering view: ['.View::$last['name'].']'.PHP_EOL.PHP_EOL.$message;
26+
27+
$file = View::$last['path'];
28+
}
29+
1830
// If detailed errors are enabled, we'll just format the exception into
1931
// a simple error message and display it on the screen. We don't use a
2032
// View in case the problem is in the View class.
2133
if (Config::get('error.detail'))
2234
{
2335
echo "<html><h2>Unhandled Exception</h2>
2436
<h3>Message:</h3>
25-
<pre>".$exception->getMessage()."</pre>
37+
<pre>".$message."</pre>
2638
<h3>Location:</h3>
27-
<pre>".$exception->getFile()." on line ".$exception->getLine()."</pre>";
39+
<pre>".$file." on line ".$exception->getLine()."</pre>";
2840

2941
if ($trace)
3042
{

laravel/laravel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137

138138
foreach ($languages as $language)
139139
{
140-
if (starts_with($uri, $language))
140+
if (preg_match("#^{$language}(?:$|/)#i", $uri))
141141
{
142142
Config::set('application.language', $language);
143143

laravel/log.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,9 @@ public static function write($type, $message)
4949
Event::fire('laravel.log', array($type, $message));
5050
}
5151

52-
// If there aren't listeners on the log event, we'll just write to the
53-
// log files using the default conventions, writing one log file per
54-
// day so the files don't get too crowded.
55-
else
56-
{
57-
$message = static::format($type, $message);
52+
$message = static::format($type, $message);
5853

59-
File::append(path('storage').'logs/'.date('Y-m-d').'.log', $message);
60-
}
54+
File::append(path('storage').'logs/'.date('Y-m-d').'.log', $message);
6155
}
6256

6357
/**

laravel/str.php

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,22 @@ class Str {
99
*/
1010
public static $pluralizer;
1111

12-
/**
13-
* Get the default string encoding for the application.
14-
*
15-
* This method is simply a short-cut to Config::get('application.encoding').
16-
*
17-
* @return string
18-
*/
19-
public static function encoding()
20-
{
21-
return Config::get('application.encoding');
22-
}
12+
/**
13+
* Cache application encoding locally to save expensive calls to Config::get().
14+
*
15+
* @var string
16+
*/
17+
public static $encoding = null;
18+
19+
/**
20+
* Get the appliction.encoding without needing to request it from Config::get() each time.
21+
*
22+
* @return string
23+
*/
24+
protected static function encoding()
25+
{
26+
return static::$encoding ?: static::$encoding = Config::get('application.encoding');
27+
}
2328

2429
/**
2530
* Get the length of a string.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
class Model extends Laravel\Database\Eloquent\Model {
4+
5+
public function set_setter($setter)
6+
{
7+
$this->set_attribute('setter', 'setter: '.$setter);
8+
}
9+
10+
public function get_getter()
11+
{
12+
return 'getter: '.$this->get_attribute('getter');
13+
}
14+
15+
}

laravel/tests/cases/auth.test.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,6 @@ public function testLogoutMethodLogsOutUser()
294294

295295
Auth::logout();
296296

297-
// A workaround since Cookie will is only stored in memory, until Response class is called.
298-
Auth::driver()->token = null;
299-
300297
$this->assertNull(Auth::user());
301298

302299
$this->assertFalse(isset(Session::$instance->session['data']['laravel_auth_drivers_fluent_login']));

0 commit comments

Comments
 (0)