Wrong parameter type to function call

Project:Ubercart Popular Product
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:fixed
Description
Project: 
Ubercart

I keep getting the following error message:

"warning: Parameter 1 to admin_menu_admin_menu() expected to be a reference, value given in C:\wamp\www\drupal-6.16\includes\module.inc on line 483."

I think this issue is causing me problems because although I can upload images (thumbnails are displayed correctly in the product node editor), no images are displayed to the user when browsing the products.

manObject's picture
Offline
Joined: 03/26/2010
Juice: 41
#1

This problem and related warnings about wrong parameters to function ereg() have been chased down to the version of PHP I was using: PHP 5.3.0 (the latest stable released version). The problem goes away when PHP 5.2.11 is used instead. After raising the issue at php.org I now know that function ereg() has been deprecated for some time; no live code should be using ereg() any more. Scripts that still depend on it (there is clearly at least one lurking within the Ubercart package) need to be updated to use function preg_replace() instead.

I hope this clears up most of the "funnies" other users have been experiencing - particularly with uploaded images not appearing. I say this because I have a hunch that the dodgy script is actually in module Imagecache...

duckz's picture
Offline
Joined: 05/13/2009
Juice: 115
#2

can you post the php version that you use?

---------------------------------------------------------------------------------------------------------------------
available for custom works, drupalstore.info
------------------------------------------------

duckz's picture
Offline
Joined: 05/13/2009
Juice: 115
#3

try the version 1.1 and see if the error is gone or not

AttachmentSize
uc_popular_1.1.zip 8.91 KB

---------------------------------------------------------------------------------------------------------------------
available for custom works, drupalstore.info
------------------------------------------------

duckz's picture
Offline
Joined: 05/13/2009
Juice: 115
#4
Status:active» fixed

Fixed with the latest version, the problem is in the permission is not an array()

---------------------------------------------------------------------------------------------------------------------
available for custom works, drupalstore.info
------------------------------------------------