Wp-rocket: 3.4.1-alpha2 - Wrong version number and PHP notices

Created on 21 Oct 2019  路  2Comments  路  Source: wp-media/wp-rocket

The version number wasn't updated - https://github.com/wp-media/wp-rocket/blob/2420f85b10e0fd2958f3d76da5aefa2aaea60ec4/wp-rocket.php#L21

Received these notices when Cloudflare options was saved:

PHP Notice:  Trying to get property of non-object in /home/wpquicki/mega/wp-content/plugins/wp-rocket/inc/functions/cloudflare.php on line 76
Undefined property: stdClass::$name in /home/wpquicki/mega/wp-content/plugins/wp-rocket/inc/functions/cloudflare.php on line 76

Related conversation - https://wp-media.slack.com/archives/CBJ2KQ0MU/p1571684801037700

cloudflare low bug

All 2 comments

Cloudflare call to zone was wrong. Needs to be:
$cf_api_instance->get( 'zones/' ); instead of $cf_api_instance->get( 'zones/' . $cf_zone_id );
and it returns in result an array of objects because on a Cloudflare account there can be multiple websites enabled.

After discussing this, we agreed on still using the zones/ID_ZONE endpoint, to be more in line with our current settings and keep the code simpler.

The version number also needs to be updated to 3.4-alpha3 for the last round of testing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

webtrainingwheels picture webtrainingwheels  路  5Comments

piotrbak picture piotrbak  路  4Comments

vmanthos picture vmanthos  路  3Comments

crystinutzaa picture crystinutzaa  路  4Comments

aniatanasova picture aniatanasova  路  5Comments