power-media / prado3

Automatically exported from code.google.com/p/prado3
Other
0 stars 0 forks source link

PHP Warning Mesage when using TMemCache & I18N #384

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I keep on getting this error:

[Warning] call_user_func_array() expects parameter 2 to be array, string given 
(@line 190 in file ${PradoFramework}/Web/UI/WebControls/TOutputCache.php).

when using I18N with caching. When I change the lines there like here, it works:

if($action[0]==='Page.ClientScript')
call_user_func_array(array($cs,$action[1]),$action[2]);

else 
if($action[0]==='Page') call_user_func_array(array($page,$action[1]),array($acti
on[2]));

else                call_user_func_array(array($this->getSubProperty($action[0]),$action[1])
, array($action[2]));

But is this correct to do so?

What version of the product are you using? On what operating system?
PHP 5.3.6 & Prado 3.1.10

Original issue reported on code.google.com by tleidin...@gmail.com on 30 Jan 2012 at 9:46

GoogleCodeExporter commented 8 years ago
Can you please post the full error and not only the last line of it?

Original comment by ctrlal...@gmail.com on 30 Jan 2012 at 3:39

GoogleCodeExporter commented 8 years ago
 exception 'TPhpErrorE                                                                                                     xception' with message '[Warning] call_user_func_array() expects parameter 2 to                                                                                                      be array, string given (@line 6887 in file /var/www/prado/framework_statista/pra                                                                                                     dolite.php).' in /var/www/prado/framework_statista/pradolite.php:56\nStack trace                                                                                                     :\n#0 [internal function]: PradoBase::phpErrorHandler(2, 'call_user_func_...', '                                                                                                     /var/www/prado/...', 6887, Array)\n#1 /var/www/prado/framework_statista/pradolit                                                                                                     e.php(6887): call_user_func_array(Array, 'ctl0$content$ct...')\n#2 /var/www/prad                                                                                                     o/framework_statista/pradolite.php(6874): TOutputCache->performActions()\n#3 /va                                                                                                     r/www/prado/framework_statista/pradolite.php(4217): TOutputCache->loadRecursive(                                                                                                     )\n#4 /var/www/prado/framework_statista/pradolite.php(4217): TControl->loadRecur                                                                                                     sive()\n#5 /var/www/prado/framework_statista/pradolite.php(4217): TControl->load                                                                                                     Recursive()\n#6 /var/www/prado/framework_statista/pradolite.php(4217): TControl-                                                                                                     >loadRecursive()\n#7 /var/www/prado/framework_statista/pradolite.php(4217): TCon                                                                                                     trol->loadRecursive()\n#8 /var/www/prado/framework_statista/pradolite.php(4217):                                                                                                      TControl->loadRecursive()\n#9 /var/www/prado/framework_statista/pradolite.php(6                                                                                                     223): TControl->loadRecursive()\n#10 /var/www/prado/framework_statista/pradolite                                                                                                     .php(6215): TPage->processNormalRequest(Object(THtmlWriter))\n#11 /var/www/prado                                                                                                     /framework_statista/pradolite.php(8340): TPage->run(Object(THtmlWriter))\n#12 /v                                                                                                     ar/www/prado/framework_statista/pradolite.php(8306): TPageService->runPage(Objec                                                                                                     t(home), Array)\n#13 /var/www/prado/framework_statista/pradolite.php(9297): TPag                                                                                                     eService->run()\n#14 /var/www/prado/framework_statista/pradolite.php(8899): TApp                                                                                                     lication->runService()\n#15 /var/www/prado/statista_test4/index.php(22): TApplic                                                                                                     ation->run()\n#16 {main}

Original comment by tleidin...@gmail.com on 30 Jan 2012 at 5:00

GoogleCodeExporter commented 8 years ago
Unfortunately not even the full log gives us enough information on what's 
causing the problem. I've set up a small testcase that uses memcache+i18n and 
it seems to work here, can you test it and modify it so that it actually causes 
the error?

Original comment by ctrlal...@gmail.com on 31 Jan 2012 at 9:25

Attachments:

GoogleCodeExporter commented 8 years ago
You can close this issue - it was a problem on our side. We didn't use the 
cache properly. Sorry

Original comment by tleidin...@gmail.com on 31 Jan 2012 at 10:23

GoogleCodeExporter commented 8 years ago
No problem

Original comment by ctrlal...@gmail.com on 31 Jan 2012 at 11:06