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

Already on GitHub? Sign in to your account

Appending queries to Data has no effect, only one query is logged #3

Closed
mariano opened this Issue Jan 10, 2012 · 0 comments

Comments

Projects
None yet
2 participants
Contributor

mariano commented Jan 10, 2012

Since Data::append() uses the += operator, if appending multiple single queries, like so:

Data::append('queries', array($query));
Data::append('queries', array($query2));
Data::append('queries', array($query3));

Then only the last data is kept (since the subsequent 0 indexes replace the previous 0 indexes) This obviously needs changing in favor of an array_merge() call.

Coming up a pull request to fix this issue.

Also on this pull request: the queries.html.php element is tightly coupled to the format lithium uses to log queries, which makes it coumbersome to create custom loggers. I'll make sure to use the explain.millis array index only when there's something.

@tmaiaroto tmaiaroto closed this in cafcf42 Jan 10, 2012

mariano pushed a commit to mariano/li3_perf that referenced this issue Jan 10, 2012

Merge pull request #4 from mariano/i3
Fixing issue where Data::append is not really appending. Fixes #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment