Guest Posted November 19, 2003 Posted November 19, 2003 When I'm in the admin catagories/products and i click a catagory to navigate into it to see the products listed there, i get this error: Fatal error: Call to undefined function: array_map() in /usr/local/etc/httpd/vhosts/bnchmrk/catalog/admin/includes/functions/general.php on line 1293 This can't be a bug could it? I mean, im quite sure I have the latest release, and I havn't modified any files other than the normal style sheet and language/english/index anybody recognize this issue? I am able to insert products in the top level then move them to catagories, but then can't get at em. hookabrothaup!
quetzlcoatl Posted November 19, 2003 Posted November 19, 2003 Are the products and categories showing up on your site? If you haven't attempted to modify any files other than index.php, then some of your files may have been corrupted during the install or upload. If you have a way to view your general.php file with line numbers, compare it to mine (I'm including lines 1290-1293): // Parse and secure the cPath parameter values function tep_parse_category_path($cPath) { // make sure the category IDs are integers $cPath_array = array_map('tep_string_to_int', explode('_', $cPath));
Guest Posted November 20, 2003 Posted November 20, 2003 Thanks so much for the post quetzlcoatl , being able to compare the lines was nice. Unfortunately they where identical. I really have no idea why the error is occuring but it is for two different stores I have setup now. I just don't get it and it's really holding me up! :blink: :blink: Thanks again, Jed
quetzlcoatl Posted November 20, 2003 Posted November 20, 2003 I found this post, maybe it will help: http://www.oscommerce.com/forums/index.php?sho...=0entry251846
Guest Posted November 20, 2003 Posted November 20, 2003 Again thanks quetlcoatl! I was not able to do what he was saying to do cause ai didn't undersatnd it. But I am going to keep asking around. Maybe someone can help. It was good if nothing else to see that someone else had this same problem. That means (i think) that its less likely that it's something I did in the code to botch it. Still searching, thanks again. Jed Burdick
Guest Posted November 20, 2003 Posted November 20, 2003 Problem solved! its a ll a matter of what version of PHP you have. http://www.phpbuilder.com/manual/function.array-map.php array_map was added to php (PHP 4 >= 4.0.6) get your hosting provider to upgrade! Thanks Jed Burdick
Guest Posted December 11, 2003 Posted December 11, 2003 after looking at http://www.phpbuilder.com/manual/function.array-map.php I wrote a version of array_map that worked for me: function array_map($function, $array) { for ($i = 0; $i < count($array); ++$i) { $newArray[$i] = $function($array[$i]); } return $newArray; }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.