memberful / memberful-wp

Better membership software for WordPress.
https://memberful.com
41 stars 15 forks source link

Fix missing variable in compact call for ensure_user #319

Closed julianfssen closed 2 years ago

julianfssen commented 2 years ago

To-do thread:

Possible Bug — errors from our WP plugin logged by the customer — APKMirror

This PR fixes a PHP deprecation warning when calling compact in the ensure_present function.

The related deprecations:

PHP 7.3: Warning on undefined variable names passed to compact PHP 8.1: Warning on compact function calls with non-string and non-array string parameters

However, my approach to fix this may be inaccurate as I'm not too familiar with PHP's conventions. I'll fix it if there's a better to address this.