I’d like to report a small bug that’s causing PHP warnings when Refersion is set to “No, turn off Refersion reporting”.
On the front-end of my site, I’m getting the warning: “Undefined index: refersion_status” on lines 125 and 150 of /refersion-for-woocommerce/class.refersion.php
This problem only happens when I select “No, turn off Refersion reporting” in the admin panel.
I suspect that it is happening because of the use of
!empty()in the sanitize function on line 241 of class.refersion-admin.php
The select option for “No, turn off Refersion reporting” is zero and the integer zero counts as empty.
I locally changed this
isset()and the zero was correctly saved to the database, so
$options['refersion_status']becomes a defined index.
- The topic ‘Warning: Undefined Index ‘refersion_status’’ is closed to new replies.