Closed (won't fix)
Project:
UC Multiprice
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
22 Oct 2009 at 05:05 UTC
Updated:
19 Mar 2018 at 22:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
aries commentedAs a hotfix, put this right before the foreach line:
Comment #2
rowzee commentedi'm having the same issue. since i'm pretty much a noob, i'd just like to clarify: does that hotfix go in the form.inc file? because when i add it there, i still get the same error.
thanks in advance.
Comment #3
rowzee commentedhelp? anyone? pretty please. :)
Comment #4
rowzee commentedok...i've experimented a bit. if i place this (sans the php tags):
if (!is_array($choices)) {
$choices = array();
}
before this:
foreach ($choices as $key => $choice) {
it fixes the error -- but i still don't have a country pull down.
thanks!
Comment #5
rowzee commentedi deleted the product that wasn't working and replaced it, and now everything's working, so please ignore my previous posts.
Comment #6
aries commentedCan we say that my hotfix solves the problem?
Comment #7
rowzee commentedyes, i believe it does. thank you! :)
Comment #8
plasticlax commenteddeleting one of the overrides also works to remove the error. i am only setting 2 of the available countries because of the bug which won't let you set just one override. but then you have to delete the other one to if you want to set the one you deleted again. i think this relates to the idea that the select box should be on "Please select" rather than a default country.
also i noticed that if you hit ENTER in the override form, you lose the image and the category assignments. i also don't think changing these overrides creates a new revision.
Comment #9
Anonymous (not verified) commentedI have noticed that the $countries array in hook_form_alter in uc_multiprice.module is passed to the $form array even when it is empty, i.e. when all countries had a entered a price and therefore no more country to be selected in the dropdown select box.
Attached patch checks the array before it goes and add the empty dropdown select box, and causes form.inc to complain.
Comment #10
Docc commentedClosing. This is fixed in 2.x branch