Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

page_manager.php - PHP5 error


SupermanInNY

Recommended Posts

Posted

reset() [function.reset]: Passed variable is not an array or object in ... catalog/admin/page_manager.php

 

I followed the German OsCommerce suggestion (thank God for Babel Fish translation :)) ):

 

"Property now $info deleted"

 

Since we moved the site from a PHP4 to a PHP5 server we had several errors poping up on various Admin pages.

 

Amongst them we had a problem with the page_manager.php

 

The fix we used was to DELETE the $info variable in the array_merge() function.

You can see below the original line commented out and just below it the modified line.

 

Hope that helps (and now in English :)) ).

 

 

if ((!isset($HTTP_GET_VARS['bID']) || (isset($HTTP_GET_VARS['bID']) && ($HTTP_GET_VARS['bID'] == $pages['pages_id']))) && !isset($bInfo) && (substr($action, 0, 3) != 'new')) {

// $bInfo_array = array_merge($pages, $info);

$bInfo_array = array_merge($pages );

$bInfo = new objectInfo($bInfo_array);

}

 

-Sup.

Posted

Well that is a hack at best . . you can't merge one array!!

 

array_merge() changed it's operation in PHP 5 you have to force the parameters to both be arrays.

 

So ..

 

$bInfo_array = array_merge($pages, $info);

 

would become ..

 

$bInfo_array = array_merge((array)$pages, (array)$info);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...