-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Products names and descriptions are mandatory on priceQty file ? #46
Comments
Maybe it should be |
Well, I have a different line 1946 in the current version of the files in here, but the result that has been seen would be expected though not desired. The assumption made for the code at this point was that $v_products_name (or $v_products_description, etc) would be defined as something including an empty array; however, somehow in the process it is not even an array. So therefore: the solution to this issue is to check if the array element is set like currently written, then if it is not to evaluate if the variable is set, if it is an array and if the array element exists in the array. At least that would appear to be the case in the fileset being used. It doesn't match the fileset I just looked at as line 1946: if (isset($v_products_description[$lang_id_code]) || array_key_exists($lang_id_code, $v_products_description)) { But if everything before 1946 is the same between your version and the github version and it was an accidental incorrect copy and paste, then the solution I described above would be: if (isset($v_products_description[$lang_id_code]) || isset($v_products_description) && is_array($v_products_description) && array_key_exists($lang_id_code, $v_products_description)) { But I would still want to look (again?) at why it is not an array. I know that I had chosen to make a change of some sort before, but I thought it was to keep it as an array, although that may have been based on the field existing in the import file. Oh, no there is no expected requirement that the names/descriptions be required; however, the full language design for all portions of the code have not been updated yet either with focus having been on the full product information and then working on the other sections/arrays. That may be the cause of this issue. |
I've downloaded the master version. |
No, I'm using the master version Next-Version was a branch that was added at one point to possibly make identification easier; however, the code of it seemed functional and it got sucked in. Seems stable as comments previously provided have been incorporated such that the above issue should not exist though I will likely try to test it some time today. |
Importing the priceQty file, now it seems that the product names / description have to be present.
PHP Warning: array_key_exists() expects parameter 2 to be array, null given in C:\xampp\htdocs\vhosts\testes.local\admin\easypopulate_4_import.php on line 1946
Is this correct ?
The text was updated successfully, but these errors were encountered: