Commit graph

80 commits

Author SHA1 Message Date
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
Juan Basso
c754fb2dcb Updated copyright to 2012. 2012-03-12 22:46:46 -04:00
Juan Basso
3b1bd90ad6 Updated copyright to 2012. 2012-03-12 22:46:07 -04:00
mark_story
60989ad6c8 Fix coding standard issues in Error/ 2012-03-03 19:46:15 -05:00
mark_story
18cb9a2fc8 Fix content type errors.
'serialize' should be '_serialize'.
2012-02-04 11:12:45 -05:00
mark_story
437d68c60b Handle the case where viewPath changes.
Fixes #2537
2012-02-03 21:29:37 -05:00
mark_story
ee083e047e Fix errors with missing sub directories.
Missing content-type specific errors shouldn't trigger fatal errors.
Instead a html view should be rendered as a last resort.

Fixes #2537
2012-02-02 21:25:46 -05:00
mark_story
2e8498e166 Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Model/Datasource/Database/Postgres.php
	lib/Cake/Test/Case/Console/TaskCollectionTest.php
	lib/Cake/Test/Case/Model/ModelIntegrationTest.php
	lib/Cake/Test/Case/Utility/ClassRegistryTest.php
	lib/Cake/Utility/ClassRegistry.php
2011-12-11 22:51:40 -05:00
euromark
f9d12563a3 Translation fix
Fixes #2340

Signed-off-by: mark_story <mark@mark-story.com>
2011-12-06 12:33:47 -05:00
mark_story
d9482fef25 Limit what exceptionrenderer outputs.
The exception object should not be part of production errors.
2011-11-27 23:51:49 -05:00