Alexandru Bucur
2fe03cd82c
Only log the $_SERVER information under YII_DEBUG ( #18707 )
...
* Only log the $_SERVER information under YII_DEBUG
Since $_SERVER can contain sensitive information that could leak in CI pipelines ideally it should happen under the YII_DEBUG flag only
* Added upgrade / changelog
* Corrected the upgrade information
* Update framework/UPGRADE.md
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: Bizley <pawel@positive.codes>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
3 years ago
Alexander Makarov
ccb14ff667
release version 2.0.39
4 years ago
My6UoT9
03da5bb689
Updates to ErrorHandler, add missing type hint \Throwable ( #18302 )
...
* Updated phpdoc so it has \Throwable
- `abstract protected function renderException($exception);` is extended in web/ErrorHandler to also have `\Error`.
- `public static function convertExceptionToError($exception)` is called from widgets/ActiveField.php with
```
/**
* PHP magic method that returns the string representation of this object.
* @return string the string representation of this object.
*/
public function __toString()
{
// __toString cannot throw exception
// use trigger_error to bypass this limitation
try {
return $this->render();
} catch (\Exception $e) {
ErrorHandler::convertExceptionToError($e);
return '';
} catch (\Throwable $e) {
ErrorHandler::convertExceptionToError($e);
return '';
}
}
```
* Add \Throwable to phpdoc in response.php
The ErrorHandler has been updated in phpdoc to have throwable, this complets that change.
* Update ErrorHandler.php
fixed missing `|`
4 years ago
Alexander Makarov
38f038175f
Adjust changelog, correct phpdoc, minor code style fixes
4 years ago
egorrishe
5c3ee63316
Fix #15202 : Add optional param `--silent-exit-on-exception` in `yii\console\Controller`
4 years ago
Alexander Makarov
fd6ccb615c
release version 2.0.32
5 years ago
Sam
9b1304ab4e
Fix #17803 : Fixed ErrorHandler unregister and register only change global state when applicable
5 years ago
Robert Korulczyk
383cf0c48d
Fix #17762 : PHP 7.4: Remove special condition for converting PHP errors to exceptions if they occurred inside of `__toString()` call
5 years ago
Vladimir Reznichenko
1a74b3d4f8
[minor] SCA with Php Inspections (EA Ultimate) ( #15871 )
...
* Php Inspections (EA Ultimate): use type casting where applicable
* Php Inspections (EA Ultimate): use constants where applicable
* Php Inspections (EA Ultimate): CS
* Php Inspections (EA Ultimate): address some of one-time used variables
* Php Inspections (EA Ultimate): address some of performance-related findings
* Php Inspections (EA Ultimate): address some of performance-related findings
* Php Inspections (EA Ultimate): revert a constant usage
* Php Inspections (EA Ultimate): revert sequential assignments
* Php Inspections (EA Ultimate): build is green again
* Php Inspections (EA Ultimate): revert array_merge tweaks
* Php Inspections (EA Ultimate): revert BC-incompatible one-time used variable tweak
* Update description [skip ci]
* Php Inspections (EA Ultimate): CS
7 years ago
Alexander Makarov
6b0be47e0f
Fixes #14711 : Fixed `yii\web\ErrorHandler` displaying exception message in non-debug mode
7 years ago
Robert Korulczyk
5a8c3d537b
Enable `phpdoc_summary` rule in php-cs-fixer config ( #14675 )
...
* Enable `phpdoc_summary` rule in php-cs-fixer config.
* Fix case in "PHPDoc".
7 years ago
Robert Korulczyk
1501c659ac
Add empty lines before return statements. ( #14682 ) [skip ci]
7 years ago
Robert Korulczyk
a50d9d8e3e
Enable `include` rule in php-cs-fixer ( #14418 )
7 years ago
Robert Korulczyk
ba0ab403b5
Added php-cs-fixer coding standards validation to Travis CI ( #14100 )
...
* php-cs-fixer: PSR2 rule.
* php-cs-fixer: PSR2 rule - fix views.
* Travis setup refactoring.
* Add php-cs-fixer to travis cs tests.
* Fix tests on hhvm-3.12
* improve travis config
* composer update
* revert composer update
* improve travis config
* Fix CS.
* Extract config to separate classes.
* Extract config to separate classes.
* Add file header.
* Force short array syntax.
* binary_operator_spaces fixer
* Fix broken tests
* cast_spaces fixer
* concat_space fixer
* dir_constant fixer
* ereg_to_preg fixer
* function_typehint_space fixer
* hash_to_slash_comment fixer
* is_null fixer
* linebreak_after_opening_tag fixer
* lowercase_cast fixer
* magic_constant_casing fixer
* modernize_types_casting fixer
* native_function_casing fixer
* new_with_braces fixer
* no_alias_functions fixer
* no_blank_lines_after_class_opening fixer
* no_blank_lines_after_phpdoc fixer
* no_empty_comment fixer
* no_empty_phpdoc fixer
* no_empty_statement fixer
* no_extra_consecutive_blank_lines fixer
* no_leading_import_slash fixer
* no_leading_namespace_whitespace fixer
* no_mixed_echo_print fixer
* no_multiline_whitespace_around_double_arrow fixer
* no_multiline_whitespace_before_semicolons fixer
* no_php4_constructor fixer
* no_short_bool_cast fixer
* no_singleline_whitespace_before_semicolons fixer
* no_spaces_around_offset fixer
* no_trailing_comma_in_list_call fixer
* no_trailing_comma_in_singleline_array fixer
* no_unneeded_control_parentheses fixer
* no_unused_imports fixer
* no_useless_return fixer
* no_whitespace_before_comma_in_array fixer
* no_whitespace_in_blank_line fixer
* not_operator_with_successor_space fixer
* object_operator_without_whitespace fixer
* ordered_imports fixer
* php_unit_construct fixer
* php_unit_dedicate_assert fixer
* php_unit_fqcn_annotation fixer
* phpdoc_indent fixer
* phpdoc_no_access fixer
* phpdoc_no_empty_return fixer
* phpdoc_no_package fixer
* phpdoc_no_useless_inheritdoc fixer
* Fix broken tests
* phpdoc_return_self_reference fixer
* phpdoc_single_line_var_spacing fixer
* phpdoc_single_line_var_spacing fixer
* phpdoc_to_comment fixer
* phpdoc_trim fixer
* phpdoc_var_without_name fixer
* psr4 fixer
* self_accessor fixer
* short_scalar_cast fixer
* single_blank_line_before_namespace fixer
* single_quote fixer
* standardize_not_equals fixer
* ternary_operator_spaces fixer
* trailing_comma_in_multiline_array fixer
* trim_array_spaces fixer
* protected_to_private fixer
* unary_operator_spaces fixer
* whitespace_after_comma_in_array fixer
* `parent::setRules()` -> `$this->setRules()`
* blank_line_after_opening_tag fixer
* Update finder config.
* Revert changes for YiiRequirementChecker.
* Fix array formatting.
* Add missing import.
* Fix CS for new code merged from master.
* Fix some indentation issues.
7 years ago
Nikolay Oleynikov
950e895fe0
Fix phpDocumentor annotations ( #13905 ) [skip ci]
8 years ago
Nikolay Oleynikov
ea75068a92
Fixes #13813 : Fixed PHP 7 compatibiltiy by adding support for passing instances of `Error` to the `yii\web\Response::setStatusCodeByException()`
8 years ago
Robert Korulczyk
9cb7125921
`@return bool` in `ErrorHandler::handleError()`
8 years ago
Robert Korulczyk
450eefaa50
Some phpdoc fixes from scrutinizer.
8 years ago
Robert Korulczyk
4aa935e69e
Fixes #12055 : Changed `boolean` to `bool` and `integer` to `int` in phpdoc
8 years ago
Boudewijn Vahrmeijer
32f4dc8997
Fixes #5385 : links created from classes to corresponding guide articles ( #12920 )
8 years ago
Robert Korulczyk
5308aa1eee
Fixes #12619 : Added catch `Throwable` in `yii\base\ErrorHandler::handleException()`
8 years ago
cuiliang
c0df003ac0
merge from master
8 years ago
Alexander Makarov
1b3770fd21
Use === instead of == where possible
9 years ago
Carsten Brandt
a2568d1ec8
updated some comments and `@since` annotations
9 years ago
Carsten Brandt
6d9fe671de
various code style and whitespace adjustments
9 years ago
╃巡洋艦㊣
586684b050
2.0.5 bf7edc5
9 years ago
adinata
8ced2ba96a
Fixes #8933 : Yii is now able to properly handle HHVM fatal errors
9 years ago
Carsten Brandt
b9916b1718
log the whole exception object to allow log targets to work with it
...
fixes #6354
made possible by #7305
9 years ago
Carsten Brandt
8f1811919f
ensure error will always result in a failing HTTP status code
...
fixes #8326
proper fix for #7571 which did not work in all situations
10 years ago
Alexander Makarov
b6a591c720
Fixes #7571 : HTTP status 500 and "An internal server error occurred." are now returned in case there was an exception in layout and `YII_DEBUG` is false
10 years ago
Carsten Brandt
2aace3714c
minor adjustments
10 years ago
Alexander Makarov
2ba573bfb5
Fixes #6883 : `yii\base\ErrorHandler::logException()` is now public
10 years ago
╃巡洋艦㊣
1468bd4d3d
version 2.0.1 84b42ab
10 years ago
Alexander Makarov
ab0033542b
Fixes #6247 : Logger and error handler are now using slightly less memory
10 years ago
Ilya Antipenko
9061874bdb
Fixes #5646 : Call `yii\base\ErrorHandler::unregister()` instead of `restore_*_handlers` directly
10 years ago
Klimov Paul
6709154792
`yii\base\ErrorHandler::handleError()` adjusted keeping native error processing on error reporting miss match.
10 years ago
Qiang Xue
0087339a42
log fatal errors to yii logs.
10 years ago
Klimov Paul
1641e057a9
`VarDumper::export()` applied over framework.
10 years ago
Qiang Xue
32aa175b7c
renamed ErrorHandler::deRegister to unregister. [skip ci]
11 years ago
Carsten Brandt
2e6e318720
added ErrorHandler::deRegister()
11 years ago
Qiang Xue
c15aceb094
Refactored filter error display for GridView.
11 years ago
Thiago Talma
c1445871f4
Correction of many errors code inspection.
...
Adjustments code according to the standards.
Adding missing PHPDoc comment.
11 years ago
Carsten Brandt
a64429acf3
removed TODOs
11 years ago
Carsten Brandt
a4b6fb263d
handle Exceptions in application init()
11 years ago
Carsten Brandt
89f6a00147
created console errorHandler
11 years ago
Carsten Brandt
c93231e26b
improved session error handling
...
fixes #1946
11 years ago
Carsten Brandt
bb2906917d
adjusted guide and small code adjustements
11 years ago
Carsten Brandt
33543cbdb3
improved error handler output on console app
11 years ago
Carsten Brandt
d4ad533d48
moved error handling related methods from app to errorhandler
11 years ago
Carsten Brandt
fdface1646
added stack trace to exception output in API when YII_DEBUG is true
...
issues #303 and #2516
11 years ago