Steve80 Posted July 18, 2015 Share Posted July 18, 2015 Interestingly, only a couple of days ago, I realized that admin offers access to all reviews and the ability to delete them. There aren't that many and I have no need to delete any so far .. EXCEPT for one .. it's BLANK except for the date (back in 2011), but it occupies a line in the list. If I try to select it in order to delete it I get a series of errors.. Warning: array_merge() [function.array-merge]: Argument #3 is not an array in /home/content/76/xx/html/admin/reviews.php on line 215 Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/content/76/xx/html/admin/reviews.php on line 216 Warning: array_merge() [function.array-merge]: Argument #3 is not an array in /home/content/76/xx/html/admin/reviews.php on line 216 Warning: reset() [function.reset]: Passed variable is not an array or object in /home/content/76/xx/html/admin/includes/classes/object_info.php on line 17 Warning: Variable passed to each() is not an array or object in /home/content/76/xx/html/admin/includes/classes/object_info.php on line 18 I can click on DELETE and it SEEMS to function.. except that the entry does NOT go away and the number of lines remains the same. I've searched for an answer, but all I find is how to eliminate the reviews option altogether. If it's causing any problem, I haven't found it yet, but I don't like having this 'time bomb' sitting there. I've looked at the db with phpMyAdmin and I can see the entry in the reviews_description table.. it's there and it actually has text. I have no idea how it got this way, but would like to fix it. What would be the SQL script to delete this particular entry ?? The reviews_id appears to be 7, but I don't know how to tie this into the reviews table to delete the entire entry. As I mentioned in another topic, I know just enough about MySQL to get myself in trouble and I'd rather not hose my db. Can someone help me out? I can READ a script fairly decently, but I just can't seem to CREATE one from scratch. I guess I should mention that I have NEVER tried to delete ANY of the entries other than this one. Looking at reviews.php, it would seem to me to be an error that would occur on any item that I selected. All the values in the db for the errant one look valid to me in both reviews and reviews_description. Steve Link to comment Share on other sites More sharing options...
Hotclutch Posted July 18, 2015 Share Posted July 18, 2015 See post #3: http://www.oscommerce.com/forums/topic/266601-warning-array-merge-functionarray-merge-argument-1-is-not-an-array-in-homebabzonbopublic-htmladmincustomersphp-on-line-733/ Link to comment Share on other sites More sharing options...
Steve80 Posted July 18, 2015 Author Share Posted July 18, 2015 OK, Ashley .. fantastic - thanks (how do you guys FIND these posts with the answer - even when somewhat removed from the question?? :thumbsup: ). I found 2 places in reviews.php that needed to be 'adjusted'. HOWEVER - after reading the review, I'd like to leave it there .. but the entry in admin for the PRODUCT is still empty... mmmmm....HA!! found the issue. That particular product has been DELETED from the store - so the description doesn't exist and it can't be referenced to a part. Therefore, I guess I have no option except to delete it - it'll never be seen by a customer anyway. Thinking of it...that would be a problem anytime a product is deleted that has a review - but it's not obvious and the product ID doesn't even show in admin - just a picture of the product .. with NO LINK to that product to help find it (seems the picture should link to the product .. but it doesn't). I guess the item description would lead you to the product.. but we're talking about one that has NO description 'cos it's GONE. Can't think of another way to track that down other than going into the db, finding the product ID and then checking the db for that product .. and not finding one. Fortunately, it was moderately easy for me to do with Store Manager. All I had to do was sort the entire store listing by Product ID and it was immediately obvious :) . Oh well.. I have my answer .. mostly. I do wonder why none of the other entries generated the same error when I clicked on them. Seems the array issue would have presented itself in all cases ... hmmm... still thinking .. I'll bet the reason was that those array entries were NULL! Well, they would HAVE to be. Casting the NULL to an array solved the problem in this case. And I WAS able to delete the entry (w00t) . Steve Link to comment Share on other sites More sharing options...
Hotclutch Posted July 18, 2015 Share Posted July 18, 2015 OK, Ashley .. fantastic - thanks (how do you guys FIND these posts with the answer - even when somewhat removed from the question?? :thumbsup: ). A place called Google... :lol: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.