Jump to content

v6.0.0b5 error message - expects parameter 2 to be in array


Dirty Butter

Recommended Posts

It must be a JOIN.

 

Enable debugging and disable caching. Run a typical page (for you). If the PHP error is listed at the top of the debug, look in the SQL portion for any query that has the word JOIN in it. Let us know what those queries are.

 

I haven't come across this yet.

Link to comment
Share on other sites

This uses DB->query() but the problem is in the DB-select() method.

function state_json() {
SELECT gc.numcode, gz.id, gz.name FROM `CubeCart_geo_zone` AS `gz` LEFT JOIN `CubeCart_geo_country` AS `gc` ON gc.id=gz.country_id ORDER BY gc.name, gz.name ASC

Anyway, the select() method will only set $allowed if $table does not have "JOIN" in the expression, regardless if there is $columns and/or $order.


/admin/sources/orders.index.inc.php, line 643 of CC600b5. Nope. Sends a string for the $order argument. This does not check for in_array().

 

Catalogue->_productGallery():

            // Look for images
            if (($gallery = $GLOBALS['db']->select('CubeCart_image_index AS i INNER JOIN CubeCart_filemanager AS f ON i.file_id = f.file_id', false, array('product_id' => $product_id), array('main_img' => 'DESC'))) !== false) {

Sends an array in the $order parameter.

Link to comment
Share on other sites

The rest of the code for Catalogue->_productGallery() is the same as compared to CC5213, so the added data from CubeCart_filemanager must be getting collected for the benefit of some other function, or a skin feature. Image captions? Proper values in <img> alt attributes?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...