Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Fix undefined variable $product in ProductSchema.php #2896

Closed
nerrad opened this issue Jul 21, 2020 · 1 comment · Fixed by #2962
Closed

Fix undefined variable $product in ProductSchema.php #2896

nerrad opened this issue Jul 21, 2020 · 1 comment · Fixed by #2962
Labels
focus: rest api Work impacting REST api routes. type: bug The issue/PR concerns a confirmed bug.
Milestone

Comments

@nerrad
Copy link
Contributor

nerrad commented Jul 21, 2020

I saw these notices happening in my php logs:

 PHP Notice:  Undefined variable: product in /srv/www/wordpress-one/public_html/wp-content/plugins/woocommerce-gutenberg-products-block/src/StoreApi/Schemas/ProductSchema.php on line 561

It looks like the closure needs to pass through the $product variable via the use statement.

@nerrad
Copy link
Contributor Author

nerrad commented Jul 21, 2020

I'm making this higher priority (top of current sprint) because without a valid $product passed through, it looks like the fallback for wc_attribute_label is not going to work as expected.

@nerrad nerrad added focus: rest api Work impacting REST api routes. type: bug The issue/PR concerns a confirmed bug. labels Jul 21, 2020
@nerrad nerrad added this to the 3.1.0 milestone Jul 21, 2020
@senadir senadir self-assigned this Aug 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
focus: rest api Work impacting REST api routes. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants