?
avatar pioada
pioada
16 Jun 2021

Steps to reproduce the issue

var_dump or print_r $table in Joomla\CMS\MVC\Model\AdminModel save method or
Joomla\Component\Banners\Administrator\Model prepareTable method
Add new baner and save

Expected result

Dump $table var

Actual result

Error: 1GB memory exhausted

System information (as much as possible)

Joomla 4 beta 7
Linux, Apache, PHP 7.2.28

Additional comments

avatar pioada pioada - open - 16 Jun 2021
avatar joomla-cms-bot joomla-cms-bot - labeled - 16 Jun 2021
avatar Quy
Quy - comment - 16 Jun 2021

Please test with the nightly builds to see if the issue persists. https://developer.joomla.org/nightly-builds.html

avatar pioada
pioada - comment - 17 Jun 2021

Tested with J4 RC3 dev.
Still can't dump $table var. print_r causes Error OutOfMemoryError Error: Allowed memory size of 134217728 bytes exhausted. var_dump causes "white screen".
I think method usage looks like: Joomla\CMS\MVC\Model\AdminModel::save -> Joomla\CMS\MVC\Model\BaseDatabaseModel::getTable -> Joomla\CMS\MVC\Model\BaseDatabaseModel::_createTable -> Joomla\CMS\MVC\Model\DatabaseAwareTrait::getDbo - return $this->_db is the problem.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34531.

avatar Fedik Fedik - change - 17 Jun 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-06-17 09:29:39
Closed_By Fedik
avatar Fedik Fedik - close - 17 Jun 2021
avatar Fedik
Fedik - comment - 17 Jun 2021

It is very much depend of what exactly data you dumping,
It is not a Joomla issue.

Hint: try var_dump only for needed properties, instead of whole Object

Add a Comment

Login with GitHub to post a comment