Selecting attribute with name "value" in a query results in memory exhaustion #108

Open
OptimusCrime opened this Issue Feb 3, 2017 · 0 comments

Projects

None yet

1 participant

@OptimusCrime
OptimusCrime commented Feb 3, 2017 edited

Summary

Simple query results in a fatal error

Step to reproduce

Query below is ran i a snippet.

Note that I have also tried all combinations with or without ticks around value but the error is still there. It just happens on the value attribute. The rest of the attributes are fetched without problem.

Also note that I've tried with the other syntaxes (array and getselectcolumns) with the same results.

$c = $modx->newQuery('modTemplateVarResource');
$c->select('modTemplateVarResource.value');
$collection = $modx->getCollection('modTemplateVarResource', $c);

Observed behavior

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /core/xpdo/om/xpdoobject.class.php on line 1876

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0

Also note that the resulting query is in fact correct. The problem occur when I run getCollection. getObject works fine.

Expected behavior

No errors.

Environment

MODX Revo 2.5.4-pl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment