I have a problem when I try to import a .csv file in the framework. when enable the display_error i get the next message in the third step :
Fatal error: Uncaught Error: Call to undefined function each() in /homepages/0/d821217699/htdocs/yuc2024/lib2/inc/adodb/adodb.inc.php:1104 Stack trace: #0 /homepages/0/d821217699/htdocs/yuc2024/lib2/inc/import/step3.php(122): ADOConnection->Execute(”, Array) #1 /homepages/0/d821217699/htdocs/yuc2024/lib2/inc/jqgrid_dist.php(2324): include_once(‘/homepages/0/d8…’) #2 /homepages/0/d821217699/htdocs/yuc2024/admin/nivel6tempb.php(128): jqgrid->render(‘list1’) #3 {main} thrown in /homepages/0/d821217699/htdocs/yuc2024/lib2/inc/adodb/adodb.inc.php on line 1104
I don’t use imports, so I’ve never tested them. But that error message is for a deprecated function (line 1104). I don’t know if that’s the cause or not, but it seems reasonable.
Each() was deprecated in PHP 7.2.
It may require an update or you may have to edit the adodb.inc page to see if you can replace the each() function with foreach().
Of course, support may have a better option or a solution as well.
Thanks
Mike
Hello Mike. Your solution solve the problem, I change the function each() to foreach() and the import .csv file works fine.
Thank you so much 🙂
Thanks Mike for the reply.
For a more proper fix, Download latest version of php adodb from github and override the the lib/inc folder.
You can get latest from: https://github.com/ADOdb/ADOdb/tags and extract it in lib/inc folder. Remove old ‘adodb’ folder and rename the extracted folder to ‘adodb’.