Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: src/panels/ProfilingPanel.php Illegal string offset 'memory' #158

Open
marcoadasilvaa opened this issue Jul 15, 2016 · 0 comments
Open

Comments

@marcoadasilvaa
Copy link
Contributor

In some entries i trie to view, get error:

PHP Warning – yii\base\ErrorException

Illegal string offset 'memory'
1. in /var/www/app/vendor/bedezign/yii2-audit/src/panels/ProfilingPanel.php at line 24
15161718192021222324252627282930313233{
    use DataStoragePanelTrait;

    /**
     * @inheritdoc
     */
    public function getLabel()
    {
            $memory = sprintf('%.1f MB', $this->data['memory'] / 1048576);
            $time = number_format($this->data['time'] * 1000) . ' ms';
            return $this->getName() . ' <small>(' . $memory . ' / ' . $time . ')</small>';
    }

    /**
     * @inheritdoc
     */
    public function getDetail()

Debugging yii2-audit/src/panels/ProfilingPanel.php i can see:

$this->getModels() and $this->data is null

My configuration is:

'audit' => [
            'class' => 'bedezign\yii2\audit\Audit',
            'ignoreActions' => ['audit/*', 'debug/*'],
            'accessUsers' => [1],
            'compressData' => false,
            'layout' => '@app/views/layouts/main',
        ],

which may be failing?

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

No branches or pull requests

1 participant