wp-rocket icon indicating copy to clipboard operation
wp-rocket copied to clipboard

set default empty array when getting "cache_reject_uri" option

Open jmslbam opened this issue 2 years ago • 0 comments

Description

Because when empty it triggers an fatal array because array_flip requires and Array and nothing else. Screenshot 2022-05-24 at 16 35 20

No outstanding issue was opened herefor.

This fix applies the same logic as already is implemented by wp-media like on this line in the same file: https://github.com/wp-media/wp-rocket/blob/develop/inc/admin/ui/meta-boxes.php#L57

Type of change

  • [x] Bug fix (non-breaking change which fixes an issue)

Is the solution different from the one proposed during the grooming?

No grooming done by me :)

How Has This Been Tested?

I saved a post on my website where this option was empty.

Checklist:

Please delete the options that are not relevant.

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] My changes generate no new warnings

jmslbam avatar May 24 '22 14:05 jmslbam