Commit Graph

103 Commits

Author SHA1 Message Date
Damian Mooyman
757cfae90c API Enable Debug.friendly_error_httpcode to correctly set HTTP status code for errors 2016-05-18 14:27:45 +12:00
Daniel Hensby
aeb4aa9565 FIX Dont allow plain text friendly errors 2016-03-28 01:20:18 +01:00
Daniel Hensby
ca8d0f2818 Merge branch '3.1' into 3.2
Conflicts:
	dev/Debug.php
	docs/en/05_Contributing/01_Code.md
	forms/FormField.php
	i18n/i18nTextCollector.php
	model/DataQuery.php
2015-07-20 10:48:01 +01:00
Sam Minnee
a0003825ad Ensure proper exit code for exceptions & errors (fixes #4336) 2015-07-17 23:26:43 +01:00
Daniel Hensby
72bb9a2087 FIX Debug::text no longer incorrecty returns "ViewableData_debugger" 2015-04-01 22:13:05 +01:00
Damian Mooyman
85349820e4 BUG Debug error handler breaks error_get_last 2015-02-08 17:02:22 +13:00
Damian Mooyman
0b1f297873 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	.travis.yml
	README.md
	admin/code/LeftAndMain.php
	admin/css/screen.css
	admin/scss/screen.scss
	api/RestfulService.php
	conf/ConfigureFromEnv.php
	control/injector/ServiceConfigurationLocator.php
	control/injector/SilverStripeServiceConfigurationLocator.php
	core/ClassInfo.php
	core/Object.php
	css/AssetUploadField.css
	css/ComplexTableField_popup.css
	dev/CSSContentParser.php
	dev/DevelopmentAdmin.php
	docs/en/changelogs/index.md
	docs/en/misc/contributing/code.md
	docs/en/reference/execution-pipeline.md
	filesystem/GD.php
	filesystem/ImagickBackend.php
	filesystem/Upload.php
	forms/Form.php
	forms/FormField.php
	forms/HtmlEditorConfig.php
	forms/gridfield/GridFieldDetailForm.php
	forms/gridfield/GridFieldSortableHeader.php
	lang/en.yml
	model/Aggregate.php
	model/DataList.php
	model/DataObject.php
	model/DataQuery.php
	model/Image.php
	model/MySQLDatabase.php
	model/SQLQuery.php
	model/fieldtypes/HTMLText.php
	model/fieldtypes/Text.php
	scss/AssetUploadField.scss
	search/filters/SearchFilter.php
	security/Authenticator.php
	security/LoginForm.php
	security/Member.php
	security/MemberAuthenticator.php
	security/MemberLoginForm.php
	security/Security.php
	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php
	tests/control/HTTPTest.php
	tests/control/RequestHandlingTest.php
	tests/filesystem/UploadTest.php
	tests/forms/FormTest.php
	tests/forms/NumericFieldTest.php
	tests/model/DataListTest.php
	tests/model/DataObjectTest.php
	tests/model/TextTest.php
	tests/security/MemberAuthenticatorTest.php
	tests/security/SecurityDefaultAdminTest.php
	tests/view/SSViewerCacheBlockTest.php
	tests/view/SSViewerTest.php
2014-11-18 12:45:54 +13:00
Mark Guinn
2fd3231325 Fixes a bug that ignored any overridden path for assets/error-404.html etc 2014-09-12 12:23:20 +01:00
Damian Mooyman
eb069e605d Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
Simon Welsh
c14d58f585 Merge branch '3.1'
Conflicts:
	.travis.yml
	model/ManyManyList.php
	model/fieldtypes/DBField.php
2014-07-16 21:24:02 +10:00
Simon Welsh
cc9603d6a2 Fatal errors should always return false
This allows PHP to set the exit code on fatals.
2014-07-16 21:03:55 +10:00
Damian Mooyman
d8e9af8af8 API New Database abstraction layer. Ticket #7429
Database abstraction broken up into controller, connector, query builder, and schema manager, each independently configurable via YAML / Injector
Creation of new DBQueryGenerator for database specific generation of SQL
Support for parameterised queries, move of code base to use these over escaped conditions
Refactor of SQLQuery into separate query classes for each of INSERT UPDATE DELETE and SELECT
Support for PDO
Installation process upgraded to use new ORM
SS_DatabaseException created to handle database errors, maintaining details of raw sql and parameter details for user code designed interested in that data.
Renamed DB static methods to conform correctly to naming conventions (e.g. DB::getConn -> DB::get_conn)
3.2 upgrade docs
Performance Optimisation and simplification of code to use more concise API
API Ability for database adapters to register extensions to ConfigureFromEnv.php
2014-07-09 18:04:05 +12:00
Damian Mooyman
3c5e51a9f1 API Debug::dump in CLI no longer generates HTML. Uses colours.
API Column size is configurable in DebugView
2014-07-05 14:37:06 +12:00
Loz Calver
454412905c Make default PHP error handler fatal 2014-03-15 11:52:01 +00:00
Damian Mooyman
0cbad41d3b Rewrote usages of error suppression operator 2014-03-05 15:48:55 +13:00
Ingo Schommer
a0dbfc61b6 FIX text/html type for Debug::friendlyError() in live mode
Avoid unparsed HTML responses in case of httpError(4xx) or
httpError(5xx) in live mode. The SS_HTTPResponse_Exception constructor
automatically set "text/plain" a content type, which conflicts
with the later choice of Debug::friendlyError() to return HTML.

This is a hotfix, needs more work to properly separate
logic flow from presentation concerns (e.g. through request processors).
2013-11-18 16:02:12 +01:00
Ingo Schommer
55729dfc27 Removed deprecated log/email logic from Debug (fixes #2573)
Was deprecated in 2009 with a682ab9c0e,
and removed in 2012 with 9eca2d676f
2013-10-23 11:22:34 +02:00
Daniel Hensby
a8c9fffed4 Appending to debug.log file
Until now debug.log files were loaded into memory, concatenated and then re-written to disk. This is an intensive operation on a large file.

I've added the `FILE_APPEND` flag to append to this file instead.
2013-10-10 11:07:58 +01:00
jean
3de75f396e FIX Avoid unnecessary user_error when no controller set for friendly errors in Debug class 2013-05-14 16:58:57 +12:00
Ingo Schommer
3334eafcb1 API Marked statics private, use Config API instead (#8317)
See "Static configuration properties are now immutable, you must use Config API." in the 3.1 change log for details.
2013-03-24 17:20:53 +01:00
Ingo Schommer
bea1b9002d Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	control/HTTP.php
2013-02-26 13:28:35 +01:00
Ingo Schommer
0c6ac1960e Fixed whitespace usage 2013-02-18 15:43:52 +01:00
Ingo Schommer
92458d9f43 Fixed line lengths 2013-02-18 14:41:49 +01:00
Ingo Schommer
634c91c6ff Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	email/Mailer.php
2013-01-30 12:46:24 +01:00
Sam Minnee
6fcbad1a31 BUGFIX: Updated SilverStripe error handler so that log_errors still works. 2013-01-29 18:03:48 +01:00
Sam Minnee
d8bfc0bb48 API CHANGE: Added Security::set_login_url() so that you can define an alternative log-in page if you have made one yourself. 2013-01-29 18:03:47 +01:00
Damian Mooyman
f5749795a1 BUG Exception handling and email notification mechanism now correctly considers the stacktrace as provided by the exceptionHandler function, instead of attempting to perform a debug_backtrace further down the reporting chain (which ends up generating an unnecessarily nested stacktrace). Debug was cleaned up so that errorHandler and exceptionHandler both act consistently. As a result, the LogErrorEmailFormatter class could be simplified.
This was required to fix a bug in which exceptions would not have a visible stacktrace when handled by the email logger.
2013-01-24 09:36:42 +01:00
Sean Harvey
6a868e79e1 Removing deprecated prototype/behaviour libraries 2012-11-16 11:37:56 +13:00
Sean Harvey
26a3c1cf4a Re-adding Debug::caller() which was inadvertently removed in 9eca2d6 2012-11-15 14:56:43 +13:00
Sean Harvey
9eca2d676f Removing deprecated Debug functions, use SS_Log and SS_Backtrace instead 2012-11-15 14:43:14 +13:00
Sam Minnee
1f7fc1f76a FIX Remove instances of lines longer than 120c
The entire framework repo (with the exception of system-generated files) has been amended to respect the 120c line-length limit.  This is in preparation for the enforcement of this rule with PHP_CodeSniffer.
2012-09-30 17:18:13 +13:00
Ingo Schommer
e2f073f38a Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
Saophalkun Ponlu
60987acbdb Various minor visual enhancements for Sapphire test report 2012-09-01 11:58:52 +12:00
jakr
c2414aa7dd API Debug::showError() no longer calls exit() (fixes #2644)
Remove exit() from showError to continue execution after an user_error of warning (warningHandler) or notice (noticeHandler) level.
2012-08-16 22:58:55 +02:00
Will Rossiter
48408d323a FIX: exclude error string in headers to prevent white screen display. 2012-06-29 18:14:14 +12:00
Simon Welsh
f07258f3cf MINOR Update @package values to match renaming sapphire 2012-04-15 10:50:19 +12:00
Andrew O'Neil
c5aa074bff BUGFIX: Fix E_STRICT errors not being reported 2012-04-11 14:39:02 +12:00
Sean Harvey
cf014dc56d MINOR Replaced use of deprecated split() with preg_split() and fixed use of "&new Class()" which is deprecated in PHP 5.3
ENHANCEMENT E_DEPRECATED and E_USER_DEPRECATED are now handled as notice level errors in Debug.
2012-03-27 23:16:52 +13:00
Sam Minnee
7db3b8ecd6 MINOR: Raise deprecation errors in the same way as notice-level errors. 2012-03-24 16:34:10 +13:00
Ingo Schommer
c7b02d2063 MINOR Rewrite stack trace from "In line <line> of <file>" to a more readable and common "<file>:<line>" 2012-02-06 23:38:32 +01:00
Ingo Schommer
3a7ac9759a BUGFIX Consistently using multibyte-safe htmlentities() 2011-11-29 10:43:06 +01:00
Sam Minnee
e5afa25522 MINOR: Use Deprecation class to indicate deprecated methods in core. 2011-10-29 17:34:31 +13:00
Ingo Schommer
d61444e976 API CHANGE Moved Translatable class into new 'translatable' module 2011-03-29 18:07:56 +13:00
Paul Meyrick
dc36725869 MINOR Using BlankPage template in SecurityTest, BasicAuthTest to remove ContentController dependency
MINOR Checking for SiteTree class existence in Security, Translatable
MINOR Checking for ContentController existence in FulltextSearchable
MINOR Removed unnecessary ContentController tests from ObjectTest
MINOR Replaced CMS specific examples in PermissionCheckboxSetFieldTest, DataObjectTest
MINOR Changed SecurityTest to make assertions against Security/login rather than relying on redirection from admin/cms
2011-03-29 18:07:55 +13:00
Ingo Schommer
da909a0214 BUGFIX Fixed usage of htmlentities() and html_entity_decode() to be UTF8 compatible by default 2011-03-21 18:13:01 +13:00
Sam Minnee
25af09b0f6 MINOR #5943 Debug::text() boolean values are amended with (bool) so they don't get confused with "true" or "false" which could be strings (thanks Pigeon!) (from r111676)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112918 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 04:52:33 +00:00
Ingo Schommer
9b177ec458 BUGFIX Making status description in Debug::friendlyError() compatible to HTTP 1.1 spec (removing any markup and newlines) (from r106867)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112540 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:06:31 +00:00
Andreas Piening
3c795141ef MINOR Supress notice if $_REQUEST['url'] doesn't exist in Debug::showError() (from r100832)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@108807 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-08-03 01:07:51 +00:00
Ingo Schommer
f3c0cbc1ab BUGFIX Setting HTTP status in current controller for Debug::friendlyError() to avoid it being overwritten in HTTPResponse->output() later in the execution chain
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92535 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-21 02:31:30 +00:00
Andrew Short
79773042be API CHANGE: Renamed conflicting classes to have an "SS_" namespace, and renamed existing "SS" namespace to "SS_". The affected classes are: HTTPRequest, HTTPResponse, Query, Database, SSBacktrace, SSCli, SSDatetime, SSDatetimeTest, SSLog, SSLogTest, SSLogEmailWriter, SSLogErrorEmailFormatter, SSLogErrorFileFormatter, SSLogFileWriter and SSZendLog.
MINOR: Replaced usage of renamed classes with the new namespaced name.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90075 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-26 03:06:31 +00:00