Commit graph

89 commits

Author SHA1 Message Date
Anthony GRASSIOT
aa42b80a4d a / an typo fixes fot API 2014-07-30 22:11:03 +02:00
chinpei215
0c1fc36b14 Fix an infinite recursion caused by missing plugin
When a MissingPluginException has caught when rendering an exception,
we should disable the plugin as needed to prevent an infinite recursion.
2014-07-09 15:55:41 +09:00
mark_story
86a071353d Fix api doc comment errors in Error/ 2014-05-31 21:57:17 -04:00
ADmad
d466e00644 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Model/Datasource/DboSource.php
	lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
	lib/Cake/Utility/Folder.php
	lib/Cake/VERSION.txt
2014-05-04 14:35:36 +05:30
Mathew Foscarini
2244e02017 remove constructor return value.
Not sure why this was here, but constructors shouldn't return a value. Nothing in the docs says that a controller's implementation of appError should return a value either. So I figure this was a mistake.
2014-04-30 16:25:01 -04:00
ADmad
18255bdcf3 Fixed typo in var name. 2014-01-06 02:32:34 +05:30
mark_story
5fd8883691 Merge branch 'master' into 2.5 2014-01-05 15:45:09 -05:00
euromark
71fb17e092 keep name as well 2014-01-03 16:33:02 +01:00
euromark
a02ab67521 unify exception and error handling. 2014-01-03 12:42:52 +01:00
euromark
3d51bfee3b Correct casing. 2014-01-03 04:09:19 +01:00
Marc Würth
7cfa0116f4 Removed "PHP 5" from file header DocBlocks
This statement does not serve a purpose anymore.
In a long forgotten world it indicated the main version number of PHP which the code in the file was compatible to.
http://pear.php.net/manual/en/standards.sample.php
But since PHP 5.1 and later this is only marginally true.
Thus I propose to remove it from CakePHP.
2013-11-13 22:58:39 +01:00
euromark
1cb24ae537 CS fixes using phpcs-fixer auto-correction. 2013-10-12 01:27:00 +02:00
euromark
910ee33710 remove wrong trailing slash 2013-09-16 00:40:37 +02:00
euromark
e7f380d2b7 doublespace to single space 2013-07-05 14:36:40 +02:00
Marc Würth
4c9f0414cb Improved the DocBlocks and other code cleanup
Fixed @license tag, url comes first
Whitespace and other minor code cleanup
Added some docblocks
2013-05-31 00:11:19 +02:00
mark_story
41e0c524f2 Only try to use CakeErrorController if AppController exists.
This fixes missing error pages when there are parse errors in
AppController.

Fixes #3850
2013-05-26 22:11:53 -04:00
euromark
111366d5c8 == to === and != to !== where applicable 2013-02-12 03:38:08 +01:00
Graham Weldon
66d856d883 Added extra line for referencing license file for copyright 2013-02-08 21:22:51 +09:00
Graham Weldon
7b860debe4 This commit is dedicated to Mark Story, who has put in much dedicated time and effort into CakePHP over the years.
I just wanted to ruin his evening, because this change needs to be merged into CakePHP 3.0.
2013-02-08 20:59:49 +09:00
mark_story
f97fe05e65 Merge branch 'master' into 2.3 2012-12-27 20:59:06 -05:00
mark_story
2ba117eeda Handle MissingViewExceptions better.
When Router::parseExtensions() is enabled for a file extension
that does not map to a view an infinite loop of attempting to render
View/$ext/error500.ctp will be entered. When catching
a MissingViewException check if we were trying to render an
error500. If we were, revert to safe rendering as we might enter a loop.
2012-12-27 20:58:49 -05:00
euromark
b811afbc44 double spaces to single ones 2012-12-22 23:48:15 +01:00
ADmad
72d6ca636f Docblock fixes 2012-11-29 04:36:29 +05:30
mark_story
82d20ed948 Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/Test/Case/Model/ModelReadTest.php
	lib/Cake/Test/Case/View/MediaViewTest.php
2012-11-24 15:44:52 -05:00
mark_story
3083b01f7d Fix exceptions being thrown in beforeFilter breaking error pages.
If an exception was raised in the AppController::beforeFilter(),
requests for content-type responses would render as HTML. Extracting the
startupProcess() allows us to keep a reference to the error controller,
which can be used to force startup RequestHandlerComponent if its
enabled.

Fixes #3389
2012-11-24 15:38:42 -05:00
mark_story
60f9626838 Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/Test/Case/View/MediaViewTest.php
2012-11-02 16:52:51 -04:00
ADmad
cc6b699db4 Added missing App::uses() statement. Closes #3331 2012-11-02 02:16:02 +05:30
euromark
5324a8ca9c cleanup 2012-10-27 00:26:54 +02:00
dogmatic69
641ba9f3e6 Merge branch '2.3' into type-checks
Conflicts:
	lib/Cake/Error/ExceptionRenderer.php
	lib/Cake/Routing/Dispatcher.php
2012-10-24 19:03:44 +01:00
mark_story
57f81da983 Fix variable naming. 2012-10-04 11:27:24 -04:00
mark_story
feda6e06a0 Reduce some code complexity. 2012-10-03 22:59:35 -04:00
dogmatic69
408e619c9f Merge branch '2.3' into type-checks
Conflicts:
	lib/Cake/Console/Command/Task/ModelTask.php
	lib/Cake/Controller/Component/RequestHandlerComponent.php
	lib/Cake/Model/Datasource/Database/Mysql.php
	lib/Cake/Utility/CakeNumber.php
2012-10-01 02:08:00 +01:00
mark_story
59e948fb1b Merge branch 'master' into 2.3 2012-09-28 21:20:24 -04:00
mark_story
393849a9ba Make exception rendererer more resiliant
Exceptions in beforeRender() should render correct error pages.

Fixes #3235
2012-09-27 21:39:22 -04:00
euromark
b47e3a7d92 move charset/App.encoding into CakeResponse 2012-09-27 20:28:19 +02:00
dogmatic69
22a2e1b51e converting $foo == / $foo == 0 to !$foo (and a few $foo === 0) 2012-09-14 18:42:25 +01:00
Ceeram
d4986b5f24 add responseHeader() method to new base exception class, ExceptionRenderer will pass the headers to the response.
Tests added.
2012-08-09 14:52:05 +02:00
ADmad
8931b74ba2 Removed variable escaping in CakeErrorController::beforeRender(). Closes #3074 2012-08-05 02:36:29 +05:30
mark_story
ab6fab6675 Add missing import. 2012-07-21 20:42:46 -04:00
ADmad
9ce216b09d Revert "Fix missing view variables."
Commit 7416c53 shows error message from last exception instead of first one
and also displays framework specific error messages instead of generic ones with debug off.
We don't want either.

This reverts commit 7416c530a2.
2012-06-11 02:36:51 +05:30
ADmad
fa0d1c7997 Fix layout path value causing View to generate layout paths with extra slash at end 2012-06-10 22:19:39 +05:30
Ceeram
4c6453501e Merge branch '2.1' into 2.2 2012-06-02 01:47:21 +02:00
Rachman Chavik
07d9a75fcb Helpers in custom CakeErrorController are lost
Since many exceptions do not have its own 'template' file, customized
APP/Controller/CakeErrorController with its own list of helpers could be
ignored.

This happens becase ExceptionRenderer is forced to to use _outputMessageSafe
when a template is missing.  This causes Controller::$helpers to be reset with
default values.
2012-06-01 15:28:06 +07:00
mark_story
7416c530a2 Fix missing view variables.
When rendering a exception caught when rendering
an exception, some view variables were missing causing fatal
errors.

Fixes #2843
2012-05-05 13:30:18 -04:00
mark_story
efe836480b Fix error when rendering fatal error page.
If you included parse errors in AppController, the fatal error
page would not correctly display.
2012-05-05 12:54:41 -04:00
Ceeram
c2a8fca00c Merge branch '2.1' into 2.2
Conflicts:
	lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php
2012-04-05 23:27:21 +02:00
ADmad
c6ce15720e Revert "Always use error layout when rendering error pages."
This reverts commit 3495422ac5.
2012-04-06 00:47:50 +05:30
mark_story
77f698dbcd Fix which request is used for error pages.
The most recent request in the request stack should be used,
as it is most likely the request containing an exception.

Fixes incorrect error pages generated inside requestAction() calls.

Fixes #2746
2012-04-03 13:24:36 -04:00
ADmad
3495422ac5 Always use error layout when rendering error pages. 2012-03-31 12:42:17 +05:30
ADmad
0832e18e9e Adding separate error layout for CakeErrorController as using default layout often caused nested errors. Closes #2682 2012-03-18 14:05:41 +05:30