paulgibbs / behat-wordpress-extension

WordHat: Behat for WordPress
https://wordhat.info
GNU General Public License v3.0
106 stars 20 forks source link

Fix usage of an undefined variable when attempting to create users with the wpphp driver #251

Closed johnbillion closed 5 years ago

johnbillion commented 5 years ago

Description

When using the wpphp driver, creating users triggers an error because the UserElement::create() method doesn't pass the correct variable to its get() method after creating the user.

This fixes that.

paulgibbs commented 5 years ago

Good catch - I've just manually tried to check all the rest of the returns, and I can't see any more. Shame there isn't tooling to pick up on this -- I'll see if phpstan or phpcs could do that.

paulgibbs commented 5 years ago

Thank you very much!

johnbillion commented 5 years ago

Yeah PHPStan should be able to pick this up.