Commit graph

141 commits

Author SHA1 Message Date
mark_story
a7213b2e64 Update doc block. 2013-07-05 21:25:06 -04:00
Marc Würth
85a75906d4 Minor doc block improvements
http://ch1.php.net/manual/de/exception.construct.php
Second parameter gets only passed by. Exception constructor uses an int for the second parameter,not a string.

Replaced text by docblock @see
http://www.phpdoc.org/docs/latest/for-users/phpdoc/tags/see.html
2013-07-06 00:27:23 +02:00
euromark
e7f380d2b7 doublespace to single space 2013-07-05 14:36:40 +02:00
euromark
7cb19b97db coding standards and simplification of else cases as well as some minor fixes 2013-07-03 00:52:48 +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
Pierre Martin
c6d8b477fc Prevent autoload when checking for the existence of HttpException
The class_exists check has been added in 4f29f58a5e (L1R28) to prevent a side effect with a PECL extension.

However if an autoloader such as the Composer one is loaded, it will try to require this `exceptions.php` file again:
```
    'HttpException' => $vendorDir . '/pear-pear.cakephp.org/CakePHP/Cake/Error/exceptions.php',
```
this will result in a "Fatal error:  Cannot redeclare class CakeBaseException"
2013-05-08 13:25:42 +03:00
mark_story
dea4fa4d73 Fallback to the default renderer if the config key is missing. 2013-03-30 13:40:58 -04:00
mark_story
3d4ebc038c Throw exceptions when non Datasource classes are used as Datasources.
Using models as datasources can cause segmentation faults. Guard against
that by checking types and raising exceptions early.

Fixes #3694
2013-03-12 21:59:45 -04:00
U-Zyn Chua
af29fc5f8e Fix an issue which gives gibberish output when gzip is enabled. 2013-02-26 00:23:00 +08: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
ADmad
d5ddaa4cb7 Added missing keyword 2013-01-12 11:30:25 +05:30
ADmad
d8551c49e5 Improve messages logged for exceptions 2013-01-12 11:30:25 +05:30
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
27d7e2865e Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/Console/Command/ConsoleShell.php
	lib/Cake/Network/CakeSocket.php
	lib/Cake/Network/Http/HttpResponse.php
	lib/Cake/Utility/Folder.php
	lib/Cake/View/MediaView.php
	lib/Cake/basics.php
2012-11-20 23:02:33 -05:00
Ceeram
56225bcca3 fix all warnings except TODO warnings 2012-11-14 12:56:10 +01:00
ADmad
1476ccbe7e Revert "Merge pull request #937 from bar/master-controlelr-test"
This reverts commit ba8f278075, reversing
changes made to 4c6c3b0554.
2012-11-03 21:54:00 +05:30
Ber Clausen
670bf3c47c Revert "Removing unneeded App::uses() call" as it causes ControllerTest
to fail.

This reverts commit 0fb4d1d3d8.
2012-11-02 21:01:57 -03: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
9a66768aa4 Merge branch 'master' into 2.3 2012-10-08 13:08:58 -04: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
ADmad
0fb4d1d3d8 Removing unneeded App::uses() call 2012-10-04 00:24:27 +05:30
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
mark_story
e2781a536a Fix whitespace error. 2012-06-23 21:03:15 -04:00
mark_story
5e54be4e5a Merge branch '2.1' into 2.2
Conflicts:
	lib/Cake/Error/exceptions.php
2012-06-23 16:41:32 -04:00
Ceeram
b913fe5303 better error message in MissingConnectionException when driver is not enabled 2012-06-23 11:42:26 +02: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
Jelle Henkens
f7ce5262b7 Updating mixed @param documentation to seperate list of accepted types 2012-05-21 21:55:10 +01:00
Rachman Chavik
e6860fb856 changing LOG_ERROR to LOG_ERR in core files 2012-05-13 18:51:57 +07:00