lat9 / dbio

Database Input/Output for Zen Cart
GNU General Public License v3.0
3 stars 1 forks source link

php warning when no match for category on add/insert a new product #191

Closed torvista closed 2 years ago

torvista commented 3 years ago

php 8.0.8, strict errors

The following warnings/errors were generated by the above action: ✗ Product not inserted at line number 2, no match found for categories_name (Fabricantes).

[16-Jul-2021 18:03:42 Europe/Madrid] Request URI: /zencart-158/admin/index.php?cmd=dbio_manager&action=file, IP address: 127.0.0.1

1 DbIoProductsHandler->importAddField() called at [...\zencart-158\admin\includes\classes\dbio\DbIoHandler.php:1410]

2 DbIoHandler->importProcessField() called at [...\zencart-158\admin\includes\classes\dbio\DbIoHandler.php:894]

3 DbIoHandler->importCsvRecord() called at [...\zencart-158\admin\includes\classes\dbio\DbIo.php:265]

4 DbIo->dbioImport() called at [...\zencart-158\admin\dbio_manager.php:240]

5 require(...\zencart-158\admin\dbio_manager.php) called at [...\zencart-158\admin\index.php:11]

--> PHP Warning: Undefined variable $manufacturers_id in ...\zencart-158\admin\includes\classes\dbio\DbIoProductsHandler.php on line 972.

lat9 commented 3 years ago

I'm thinking that the data-import record for this issue has more than just a missing categories_name.

torvista commented 3 years ago

Sorry, I forgot about this and didn't make good enough notes....I've tried the files that were being worked with on that day but can't reproduce the fault. So closing for now.

lat9 commented 3 years ago

FWIW, those questions were based on a corner-case that I found when reviewing the DbIoProducts.php module; I'll have a correction real-soon-now.