Details
-
Bug
-
Resolution: Fixed
-
Low
-
3.9.3
-
None
-
Operating System:win xp pro
PHP Version: (please be specific, like '4.4.3' or '5.1.5') 4.4.6
Database and version:mysql 4.1
Browser (and version):ff2
using apache 1.37.
Description
using XDebug, i got the following PHP warning when I did something stupid in ezpublish 386 (see reproduce steps):
( ! ) Warning: array_keys() [function.array-keys]: The first argument should be an array in c:\www\ezp393.jkn.ez.no\kernel\classes\workflowtypes\event\ezpaymentgateway\ezpaymentgatewaytype.php on line 258 Call Stack # Time Function Location 1 0.0234 {main}( ) ..(null):0 2 0.3752 ezmodule->run( ) ..(null):731 3 0.3760 ezprocess::run( ) ..(null):1184 4 0.3760 ezprocess->runfile( ) ..(null):51 5 0.3781 include( 'c:\www\ezp393.jkn.ez.no\kernel\workflow\edit.php' ) ..(null):74 6 0.5617 eztemplate->fetch( ) ..(null):381 7 0.5968 eztemplate->executecompiledtemplate( ) ..(null):569 8 0.5968 eztemplatedesignresource->executecompiledtemplate( ) ..(null):1034 9 0.5969 eztemplatecompiler::executecompilation( ) ..(null):138 10 0.5980 eztemplatecompiler::executecompilationhelper( ) ..(null):415 11 0.6079 include( 'c:\www\ezp393.jkn.ez.no\var\ezwebin_site\cache\template\compiled\edit-e133f31c402e0ee47d6522facc938359.php' ) ..(null):449 12 0.6227 eztemplate->processfunction( ) ..(null):1333 13 0.6352 ezobjectforwarder->process( ) ..(null):689 14 0.8291 eztemplate->executecompiledtemplate( ) ..(null):794 15 0.8291 eztemplatedesignresource->executecompiledtemplate( ) ..(null):1034 16 0.8292 eztemplatecompiler::executecompilation( ) ..(null):138 17 0.8307 eztemplatecompiler::executecompilationhelper( ) ..(null):415 18 0.8338 include( 'c:\www\ezp393.jkn.ez.no\var\ezwebin_site\cache\template\compiled\event_ezpaymentgateway-490d0fd596fcf5634b91f2b5c187639e.php' ) ..(null):449 19 0.8342 compiledfetchattribute( ) ..(null):28 20 0.8343 ezpaymentgatewaytype->attribute( ) ..(null):61 21 0.8343 ezpaymentgatewaytype->getgateways( ) ..(null):157 22 0.8343 array_keys ( ) ..(null):258 ( ! ) Warning: Invalid argument supplied for foreach() in c:\www\ezp393.jkn.ez.no\kernel\classes\workflowtypes\event\ezpaymentgateway\ezpaymentgatewaytype.php on line 261 Call Stack # Time Function Location 1 0.0234 {main}( ) ..(null):0 2 0.3752 ezmodule->run( ) ..(null):731 3 0.3760 ezprocess::run( ) ..(null):1184 4 0.3760 ezprocess->runfile( ) ..(null):51 5 0.3781 include( 'c:\www\ezp393.jkn.ez.no\kernel\workflow\edit.php' ) ..(null):74 6 0.5617 eztemplate->fetch( ) ..(null):381 7 0.5968 eztemplate->executecompiledtemplate( ) ..(null):569 8 0.5968 eztemplatedesignresource->executecompiledtemplate( ) ..(null):1034 9 0.5969 eztemplatecompiler::executecompilation( ) ..(null):138 10 0.5980 eztemplatecompiler::executecompilationhelper( ) ..(null):415 11 0.6079 include( 'c:\www\ezp393.jkn.ez.no\var\ezwebin_site\cache\template\compiled\edit-e133f31c402e0ee47d6522facc938359.php' ) ..(null):449 12 0.6227 eztemplate->processfunction( ) ..(null):1333 13 0.6352 ezobjectforwarder->process( ) ..(null):689 14 0.8291 eztemplate->executecompiledtemplate( ) ..(null):794 15 0.8291 eztemplatedesignresource->executecompiledtemplate( ) ..(null):1034 16 0.8292 eztemplatecompiler::executecompilation( ) ..(null):138 17 0.8307 eztemplatecompiler::executecompilationhelper( ) ..(null):415 18 0.8338 include( 'c:\www\ezp393.jkn.ez.no\var\ezwebin_site\cache\template\compiled\event_ezpaymentgateway-490d0fd596fcf5634b91f2b5c187639e.php' ) ..(null):449 19 0.8342 compiledfetchattribute( ) ..(null):28 20 0.8343 ezpaymentgatewaytype->attribute( ) ..(null):61 21 0.8343 ezpaymentgatewaytype->getgateways( ) ..(null):157
i am reporting this because ezp should be the one to display a warning or error, and not PHP.
Steps to reproduce
The payment gateway extension I were trying to install were not enabled, because of a space character on the line where the extension were activated in site.ini. So there were no gateways available when I performed these steps:
1. go admin interface->setup->workflows->standard->create new workflow
2. enter name of workflow, choose "Event/Payment Gateway" in the drop down box and click on "Add event".
3. PHP warning is displayed (if you are using XDebug)