woocommerce / wc-smooth-generator

Smooth product, customer and order generation for WooCommerce
310 stars 49 forks source link

PHP warnings while generating products #126

Open coreymckrill opened 1 year ago

coreymckrill commented 1 year ago

While the CLI is generating products, with WP_DEBUG turned on, the following warnings periodically show up:

Warning: Undefined array key 0 in /var/www/html/wp-content/plugins/wc-smooth-generator/includes/Generator/Generator.php on line 99
Warning: Attempt to read property "term_id" on null in /var/www/html/wp-content/plugins/wc-smooth-generator/includes/Generator/Generator.php on line 99

It doesn't happen for every product generated. When generating 20 products, I am seeing the set of two warnings 5 times.

coreymckrill commented 3 months ago

Another warning when generating orders after already generating customers and products:

Generating orders  20 % [=============================>                                                                                                                     ] 0:00 / 0:00Warning: Trying to access array offset on value of type bool in /srv/htdocs/wp-content/plugins/woocommerce/includes/wc-product-functions.php on line 797
Warning: Trying to access array offset on value of type bool in /srv/htdocs/wp-content/plugins/woocommerce/includes/wc-product-functions.php on line 798
Warning: Trying to access array offset on value of type bool in /srv/htdocs/wp-content/plugins/woocommerce/includes/wc-product-functions.php on line 799
Warning: Trying to access array offset on value of type bool in /srv/htdocs/wp-content/plugins/woocommerce/includes/wc-product-functions.php on line 805
Warning: Trying to access array offset on value of type bool in /srv/htdocs/wp-content/plugins/woocommerce/includes/wc-product-functions.php on line 806
Warning: Trying to access array offset on value of type bool in /srv/htdocs/wp-content/plugins/woocommerce/includes/wc-product-functions.php on line 807
Warning: Trying to access array offset on value of type bool in /srv/htdocs/wp-content/plugins/woocommerce/includes/wc-product-functions.php on line 812
Warning: Trying to access array offset on value of type bool in /srv/htdocs/wp-content/plugins/woocommerce/includes/wc-product-functions.php on line 813
Warning: Trying to access array offset on value of type bool in /srv/htdocs/wp-content/plugins/woocommerce/includes/wc-product-functions.php on line 814
Warning: Trying to access array offset on value of type bool in /srv/htdocs/wp-content/plugins/woocommerce/includes/wc-product-functions.php on line 819
Warning: Trying to access array offset on value of type bool in /srv/htdocs/wp-content/plugins/woocommerce/includes/wc-product-functions.php on line 820
Warning: Trying to access array offset on value of type bool in /srv/htdocs/wp-content/plugins/woocommerce/includes/wc-product-functions.php on line 821