Skip to content

Conversation

@lucianobaraglia
Copy link
Contributor

This small change is to avoid table content overflow when the text hasn't spaces to break words.
For example, this:

yii debugger 2013-12-18 23-09-58

becomes:

yii debugger 2013-12-18 23-12-38

@qiangxue
Copy link
Member

Please create a PR in yii2 repository. This repository is read only.

@qiangxue qiangxue closed this Dec 19, 2013
@lucianobaraglia
Copy link
Contributor Author

Okie dokie

qiangxue pushed a commit that referenced this pull request Jan 11, 2014
qiangxue pushed a commit that referenced this pull request Jan 11, 2014
@Blacknife Blacknife mentioned this pull request Feb 21, 2017
SamMousa added a commit to SamMousa/yii2-debug that referenced this pull request Mar 5, 2019
When mails fail to serialize all debug panels break due to the summary.
This is shown for a panel that is not the mail panel:
```php
PHP Warning 'yii\base\ErrorException' with message 'count(): Parameter must be an array or an object that implements Countable' 

in /project/vendor/yiisoft/yii2-debug/src/panels/MailPanel.php:111

Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleError(2, 'count(): Parame...', '/project/vendor...', 111, Array)
yiisoft#1 /project/vendor/yiisoft/yii2-debug/src/panels/MailPanel.php(111): count(NULL)
yiisoft#2 /project/vendor/yiisoft/yii2-debug/src/views/default/view.php(25): yii\debug\panels\MailPanel->getSummary()
yiisoft#3 /project/vendor/yiisoft/yii2/base/View.php(348): require('/project/vendor...')
yiisoft#4 /project/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile('/project/vendor...', Array)
yiisoft#5 /project/vendor/yiisoft/yii2/base/View.php(156): yii\base\View->renderFile('/project/vendor...', Array, Object(yii\debug\controllers\DefaultController))
yiisoft#6 /project/vendor/yiisoft/yii2/base/Controller.php(384): yii\base\View->render('view', Array, Object(yii\debug\controllers\DefaultController))
yiisoft#7 /project/vendor/yiisoft/yii2-debug/src/controllers/DefaultController.php(121): yii\base\Controller->render('view', Array)
yiisoft#8 [internal function]: yii\debug\controllers\DefaultController->actionView('5c7e9f3fd6aad', 'router')

```

For the mail panel itself this error is shown:
```php
Exception 'yii\debug\FlattenException' with message 'Serialization of 'Closure' is not allowed' 

in /project/vendor/yiisoft/yii2-debug/src/LogTarget.php:60

Stack trace:
#0 /project/vendor/yiisoft/yii2-debug/src/LogTarget.php(60): serialize(Array)
yiisoft#1 /project/vendor/yiisoft/yii2-debug/src/LogTarget.php(130): yii\debug\LogTarget->export()
yiisoft#2 /project/vendor/yiisoft/yii2/log/Dispatcher.php(189): yii\debug\LogTarget->collect(Array, true)
yiisoft#3 /project/vendor/yiisoft/yii2/log/Logger.php(177): yii\log\Dispatcher->dispatch(Array, true)
yiisoft#4 [internal function]: yii\log\Logger->flush(true)
yiisoft#5 {main}
```

While there is no (good) way to serialize a `Closure`, the very least we can do is have other panels still work.
samdark pushed a commit that referenced this pull request Mar 11, 2019
…s all panels not to render

When mails fail to serialize all debug panels break due to the summary.
This is shown for a panel that is not the mail panel:
```php
PHP Warning 'yii\base\ErrorException' with message 'count(): Parameter must be an array or an object that implements Countable' 

in /project/vendor/yiisoft/yii2-debug/src/panels/MailPanel.php:111

Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleError(2, 'count(): Parame...', '/project/vendor...', 111, Array)
#1 /project/vendor/yiisoft/yii2-debug/src/panels/MailPanel.php(111): count(NULL)
#2 /project/vendor/yiisoft/yii2-debug/src/views/default/view.php(25): yii\debug\panels\MailPanel->getSummary()
#3 /project/vendor/yiisoft/yii2/base/View.php(348): require('/project/vendor...')
#4 /project/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile('/project/vendor...', Array)
#5 /project/vendor/yiisoft/yii2/base/View.php(156): yii\base\View->renderFile('/project/vendor...', Array, Object(yii\debug\controllers\DefaultController))
#6 /project/vendor/yiisoft/yii2/base/Controller.php(384): yii\base\View->render('view', Array, Object(yii\debug\controllers\DefaultController))
#7 /project/vendor/yiisoft/yii2-debug/src/controllers/DefaultController.php(121): yii\base\Controller->render('view', Array)
#8 [internal function]: yii\debug\controllers\DefaultController->actionView('5c7e9f3fd6aad', 'router')

```

For the mail panel itself this error is shown:
```php
Exception 'yii\debug\FlattenException' with message 'Serialization of 'Closure' is not allowed' 

in /project/vendor/yiisoft/yii2-debug/src/LogTarget.php:60

Stack trace:
#0 /project/vendor/yiisoft/yii2-debug/src/LogTarget.php(60): serialize(Array)
#1 /project/vendor/yiisoft/yii2-debug/src/LogTarget.php(130): yii\debug\LogTarget->export()
#2 /project/vendor/yiisoft/yii2/log/Dispatcher.php(189): yii\debug\LogTarget->collect(Array, true)
#3 /project/vendor/yiisoft/yii2/log/Logger.php(177): yii\log\Dispatcher->dispatch(Array, true)
#4 [internal function]: yii\log\Logger->flush(true)
#5 {main}
```

While there is no (good) way to serialize a `Closure`, the very least we can do is have other panels still work.
scrummitch added a commit to scrummitch/yii2-debug that referenced this pull request Feb 16, 2022
If the UserPanel class member variable `$this->filterModel` is NULL, php 8.1 will complain and throw a deprecation error. 

I am adding an is_null() check before the class_exists call to fix this

```
PHP Deprecated Warning – yii\base\ErrorException
class_exists(): Passing null to parameter yiisoft#1 ($class) of type string is deprecated
```
themikem added a commit to DeltaV-Tech/yii2-debug that referenced this pull request Feb 25, 2022
PHP Deprecated Warning – yii\base\ErrorException
class_exists(): Passing null to parameter yiisoft#1 ($class) of type string is deprecated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants