Claudia M Posted March 11, 2019 Share Posted March 11, 2019 I dont know if one has to do with the other but here goes. I do not use the height, width, depth, dimensional unit fields provided by CubeCart. I have previously deleted all fields (and related fields) from the product_inventory database. I don't like having columns I don't use. Anyway, after updating to 6.2.4 I keep getting the following error in my error log. What should I do? Thanks in advance for any and all help. [10-Mar-2019 17:34:28 America/Louisville] PHP Warning: http_build_query() [<a href='http://docs.php.net/manual/en/function.http-build-query.php'>function.http-build-query.php</a>]: Parameter 1 expected to be Array or Object. Incorrect value given in /home/claudias/public_html/classes/db/database.class.php on line 522 [10-Mar-2019 18:03:25 America/Louisville] PHP Warning: http_build_query() [<a href='http://docs.php.net/manual/en/function.http-build-query.php'>function.http-build-query.php</a>]: Parameter 1 expected to be Array or Object. Incorrect value given in /home/claudias/public_html/classes/db/database.class.php on line 522 [10-Mar-2019 19:17:11 America/Louisville] PHP Warning: http_build_query() [<a href='http://docs.php.net/manual/en/function.http-build-query.php'>function.http-build-query.php</a>]: Parameter 1 expected to be Array or Object. Incorrect value given in /home/claudias/public_html/classes/db/database.class.php on line 522 [10-Mar-2019 19:19:35 America/Louisville] PHP Warning: http_build_query() [<a href='http://docs.php.net/manual/en/function.http-build-query.php'>function.http-build-query.php</a>]: Parameter 1 expected to be Array or Object. Incorrect value given in /home/claudias/public_html/classes/db/database.class.php on line 522 [10-Mar-2019 20:05:19 America/Louisville] PHP Warning: http_build_query() [<a href='http://docs.php.net/manual/en/function.http-build-query.php'>function.http-build-query.php</a>]: Parameter 1 expected to be Array or Object. Incorrect value given in /home/claudias/public_html/classes/db/database.class.php on line 522 [10-Mar-2019 20:33:38 America/Louisville] PHP Warning: http_build_query() [<a href='http://docs.php.net/manual/en/function.http-build-query.php'>function.http-build-query.php</a>]: Parameter 1 expected to be Array or Object. Incorrect value given in /home/claudias/public_html/classes/db/database.class.php on line 522 [10-Mar-2019 20:49:35 America/Louisville] PHP Warning: http_build_query() [<a href='http://docs.php.net/manual/en/function.http-build-query.php'>function.http-build-query.php</a>]: Parameter 1 expected to be Array or Object. Incorrect value given in /home/claudias/public_html/classes/db/database.class.php on line 522 [10-Mar-2019 20:55:30 America/Louisville] PHP Warning: http_build_query() [<a href='http://docs.php.net/manual/en/function.http-build-query.php'>function.http-build-query.php</a>]: Parameter 1 expected to be Array or Object. Incorrect value given in /home/claudias/public_html/classes/db/database.class.php on line 522 Link to comment Share on other sites More sharing options...
bsmither Posted March 11, 2019 Share Posted March 11, 2019 We are lucky in that the statement given for the error, while the function handles a multitude of callers, has a very short trail to trace back on. In short, try this: In database.class.php, near line 495, find: if ($total_pages > 1) { // Get the current query string variables $url_elements = parse_url(html_entity_decode($_SERVER['REQUEST_URI'])); $params = false; Change: $params = false; To: $params = array(); The variable $params is used in the statement making the complaint. Its value, a boolean false, is not a proper default value. A few statements later, if present, "page=all" is removed from the web address (querystring part) - probably leaving nothing else. A few statements later, a test is made to determine if the page number is numeric. It is not numeric when "page=all". So, $params never acquires any new array elements and remains a boolean false. This is wrong. (Note: I have yet to install CC624, so cannot verify this is the fix.) Link to comment Share on other sites More sharing options...
Al Brookbanks Posted March 11, 2019 Share Posted March 11, 2019 Thanks Brian. https://github.com/cubecart/v6/issues/2259 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.