Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Request details not present in Entry view in Yii 2.0.14 #238
I do get these details in yii2 debug page, but I don't see them anywhere in audit's database tables.
Also note that I get some php notices originating from AuditEntry.php (see the screenshot).
The warning is actually the piece of code that is writing all panel data to the database (and fails at it). Somehow there is an unexpected array that wasn't serialised.
Is there any way you can get us whatever it is trying to write to the database?
If you have a debugger, you can set a breakpoint in
If you don't have a debugger perhaps you can temporarily modify that file and do a
Make sure to remove any sensitive information if you're adding them here.
I think I got rid of the problem:
This code puts an array as a value into $params (AuditEntry.php line 126) :
bindValues() expects a different format, namely a simple type of an instance of PdoValue, like this:
Unable to handle this array as parameter, bindValues() just passes it along, with the array ending up in strtr()'s second parameter (as value in array of its second parameter).
With the above code change I no longer get the NOTICE, and the Entry page shows all the information I need.
This is my "composer show":
This is the bindValues() function:
As you see, it directly puts the $value into $this->params array since it is not PdoValue.
Yes, like I said, it is for your version (2.0.14).
The actual problem is that it works correctly for all versions of Yii2, except for 2.0.14 and beyond. I'll see if we can work around this somehow.