Cloudflare - Version 4.2.2

Version Description

  • 2021-03-08 =

  • Fix warning for file_get_contents of composer.json

Download this release

Release Info

Developer manatarms
Plugin Icon 128x128 Cloudflare
Version 4.2.2
Comparing to
See all releases

Code changes from version 4.2.1 to 4.2.2

cloudflare.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Cloudflare
4
  Plugin URI: https://blog.cloudflare.com/new-wordpress-plugin/
5
  Description: Cloudflare speeds up and protects your WordPress site.
6
- Version: 4.2.1
7
  Requires PHP: 7.2
8
  Author: Cloudflare, Inc.
9
  License: BSD-3-Clause
3
  Plugin Name: Cloudflare
4
  Plugin URI: https://blog.cloudflare.com/new-wordpress-plugin/
5
  Description: Cloudflare speeds up and protects your WordPress site.
6
+ Version: 4.2.2
7
  Requires PHP: 7.2
8
  Author: Cloudflare, Inc.
9
  License: BSD-3-Clause
composer.json CHANGED
@@ -31,7 +31,7 @@
31
  "_comment": [
32
  "php-compatibility-install comes from https://github.com/wimg/PHPCompatibility/issues/102#issuecomment-255778195"
33
  ],
34
- "version": "4.2.1",
35
  "config": {
36
  "platform": {
37
  "php": "7.2"
31
  "_comment": [
32
  "php-compatibility-install comes from https://github.com/wimg/PHPCompatibility/issues/102#issuecomment-255778195"
33
  ],
34
+ "version": "4.2.2",
35
  "config": {
36
  "platform": {
37
  "php": "7.2"
composer.lock CHANGED
@@ -4,7 +4,7 @@
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
  "This file is @generated automatically"
6
  ],
7
- "content-hash": "ef25f62e36cbbbbaaa9d3dd85742c6d2",
8
  "packages": [
9
  {
10
  "name": "cloudflare/cf-ip-rewrite",
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
  "This file is @generated automatically"
6
  ],
7
+ "content-hash": "88c7097730833e8db762e4326d612998",
8
  "packages": [
9
  {
10
  "name": "cloudflare/cf-ip-rewrite",
config.json CHANGED
@@ -25,5 +25,5 @@
25
  },
26
  "locale": "en",
27
  "integrationName": "wordpress",
28
- "version": "4.2.1"
29
  }
25
  },
26
  "locale": "en",
27
  "integrationName": "wordpress",
28
+ "version": "4.2.2"
29
  }
output.log CHANGED
@@ -21,35 +21,33 @@ php-7.4-build2: Pulling from cloudflare/cloudflare-wordpress/php-actions_compose
21
  5571c1cd7f43: Pulling fs layer
22
  65564f077fec: Pulling fs layer
23
  4d1e94121e00: Pulling fs layer
24
- 4612e05a72cf: Waiting
25
- 9b2beae78beb: Waiting
26
  79c03e12047a: Waiting
27
  51393fef6543: Waiting
28
  5571c1cd7f43: Waiting
29
  65564f077fec: Waiting
30
  4d1e94121e00: Waiting
31
- 320f26ee9b1c: Verifying Checksum
 
32
  320f26ee9b1c: Download complete
33
  30e209609427: Verifying Checksum
34
  30e209609427: Download complete
35
  4612e05a72cf: Verifying Checksum
36
  4612e05a72cf: Download complete
37
- 801bfaa63ef2: Verifying Checksum
38
- 801bfaa63ef2: Download complete
39
- 801bfaa63ef2: Pull complete
40
  79c03e12047a: Verifying Checksum
41
  79c03e12047a: Download complete
42
- 9b2beae78beb: Verifying Checksum
43
- 9b2beae78beb: Download complete
44
- 30e209609427: Pull complete
45
- 320f26ee9b1c: Pull complete
46
  5571c1cd7f43: Verifying Checksum
47
  5571c1cd7f43: Download complete
48
- 4612e05a72cf: Pull complete
49
  65564f077fec: Verifying Checksum
50
  65564f077fec: Download complete
 
51
  51393fef6543: Verifying Checksum
52
  51393fef6543: Download complete
 
 
53
  9b2beae78beb: Pull complete
54
  79c03e12047a: Pull complete
55
  4d1e94121e00: Verifying Checksum
21
  5571c1cd7f43: Pulling fs layer
22
  65564f077fec: Pulling fs layer
23
  4d1e94121e00: Pulling fs layer
 
 
24
  79c03e12047a: Waiting
25
  51393fef6543: Waiting
26
  5571c1cd7f43: Waiting
27
  65564f077fec: Waiting
28
  4d1e94121e00: Waiting
29
+ 4612e05a72cf: Waiting
30
+ 9b2beae78beb: Waiting
31
  320f26ee9b1c: Download complete
32
  30e209609427: Verifying Checksum
33
  30e209609427: Download complete
34
  4612e05a72cf: Verifying Checksum
35
  4612e05a72cf: Download complete
36
+ 9b2beae78beb: Download complete
 
 
37
  79c03e12047a: Verifying Checksum
38
  79c03e12047a: Download complete
39
+ 801bfaa63ef2: Verifying Checksum
40
+ 801bfaa63ef2: Download complete
 
 
41
  5571c1cd7f43: Verifying Checksum
42
  5571c1cd7f43: Download complete
43
+ 801bfaa63ef2: Pull complete
44
  65564f077fec: Verifying Checksum
45
  65564f077fec: Download complete
46
+ 30e209609427: Pull complete
47
  51393fef6543: Verifying Checksum
48
  51393fef6543: Download complete
49
+ 320f26ee9b1c: Pull complete
50
+ 4612e05a72cf: Pull complete
51
  9b2beae78beb: Pull complete
52
  79c03e12047a: Pull complete
53
  4d1e94121e00: Verifying Checksum
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: icyapril, manatarms, thillcf, deuill, epatryk, jacobbednarz
3
  Tags: cloudflare, seo, ssl, ddos, speed, security, cdn, performance, free
4
  Requires at least: 3.4
5
  Tested up to: 5.6
6
- Stable tag: 4.2.1
7
  Requires PHP: 7.2
8
  License: BSD-3-Clause
9
 
@@ -91,6 +91,10 @@ Yes, Cloudflare works with, and helps speed up your site even more, if you have
91
 
92
  == Changelog ==
93
 
 
 
 
 
94
  = 4.2.1 - 2021-03-05 =
95
 
96
  * Deprecate REST dashboard analytics
3
  Tags: cloudflare, seo, ssl, ddos, speed, security, cdn, performance, free
4
  Requires at least: 3.4
5
  Tested up to: 5.6
6
+ Stable tag: 4.2.2
7
  Requires PHP: 7.2
8
  License: BSD-3-Clause
9
 
91
 
92
  == Changelog ==
93
 
94
+ = 4.2.2 - 2021-03-08 =
95
+
96
+ * Fix warning for file_get_contents of composer.json
97
+
98
  = 4.2.1 - 2021-03-05 =
99
 
100
  * Deprecate REST dashboard analytics
src/WordPress/PluginActions.php CHANGED
@@ -53,6 +53,9 @@ class PluginActions extends AbstractPluginActions
53
  'integrationName',
54
  ];
55
 
 
 
 
56
  public function __construct(DefaultIntegration $defaultIntegration, APIInterface $api, Request $request)
57
  {
58
  parent::__construct($defaultIntegration, $api, $request);
@@ -193,13 +196,13 @@ class PluginActions extends AbstractPluginActions
193
  public function getUserConfig()
194
  {
195
  if ($this->userConfig === null) {
196
- //Need to suppress the File not found error with @
197
- $userConfigContent = @file_get_contents(dirname(__FILE__) . '/config.json');
 
198
 
199
- //Need to set an empty array for merge into config so it doesnt throw a type error
200
  $this->userConfig = [];
201
- //If we did find a config decode it
202
- if ($userConfigContent) {
203
  $this->userConfig = json_decode($userConfigContent, true);
204
  }
205
  }
@@ -212,8 +215,8 @@ class PluginActions extends AbstractPluginActions
212
 
213
  public function getComposerJson()
214
  {
215
- if ($this->composer === null) {
216
- $this->composer = json_decode(file_get_contents(dirname(__FILE__) . '/composer.json'), true);
217
  }
218
  }
219
 
53
  'integrationName',
54
  ];
55
 
56
+ const USER_CONFIG_PATH = '/../../config.json';
57
+ const COMPOSER_CONFIG_PATH = '/../../composer.json';
58
+
59
  public function __construct(DefaultIntegration $defaultIntegration, APIInterface $api, Request $request)
60
  {
61
  parent::__construct($defaultIntegration, $api, $request);
196
  public function getUserConfig()
197
  {
198
  if ($this->userConfig === null) {
199
+ if (file_exists(dirname(__FILE__) . self::USER_CONFIG_PATH)) {
200
+ $userConfigContent = file_get_contents(dirname(__FILE__) . self::USER_CONFIG_PATH);
201
+ }
202
 
203
+ // Need to set an empty array for merge into config so it doesnt throw a type error
204
  $this->userConfig = [];
205
+ if (!empty($userConfigContent)) {
 
206
  $this->userConfig = json_decode($userConfigContent, true);
207
  }
208
  }
215
 
216
  public function getComposerJson()
217
  {
218
+ if ($this->composer === null && file_exists(dirname(__FILE__) . self::COMPOSER_CONFIG_PATH)) {
219
+ $this->composer = json_decode(file_get_contents(dirname(__FILE__) . self::COMPOSER_CONFIG_PATH), true);
220
  }
221
  }
222
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit7545ca8cb46c9c484c9a7ce09ac73f4c::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitb74d70abb7505aaf7cef08dedb3b4c82::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit7545ca8cb46c9c484c9a7ce09ac73f4c
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit7545ca8cb46c9c484c9a7ce09ac73f4c
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit7545ca8cb46c9c484c9a7ce09ac73f4c', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit7545ca8cb46c9c484c9a7ce09ac73f4c', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInit7545ca8cb46c9c484c9a7ce09ac73f4c::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitb74d70abb7505aaf7cef08dedb3b4c82
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInitb74d70abb7505aaf7cef08dedb3b4c82', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInitb74d70abb7505aaf7cef08dedb3b4c82', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInitb74d70abb7505aaf7cef08dedb3b4c82::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit7545ca8cb46c9c484c9a7ce09ac73f4c
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'P' =>
@@ -42,9 +42,9 @@ class ComposerStaticInit7545ca8cb46c9c484c9a7ce09ac73f4c
42
  public static function getInitializer(ClassLoader $loader)
43
  {
44
  return \Closure::bind(function () use ($loader) {
45
- $loader->prefixLengthsPsr4 = ComposerStaticInit7545ca8cb46c9c484c9a7ce09ac73f4c::$prefixLengthsPsr4;
46
- $loader->prefixDirsPsr4 = ComposerStaticInit7545ca8cb46c9c484c9a7ce09ac73f4c::$prefixDirsPsr4;
47
- $loader->prefixesPsr0 = ComposerStaticInit7545ca8cb46c9c484c9a7ce09ac73f4c::$prefixesPsr0;
48
 
49
  }, null, ClassLoader::class);
50
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitb74d70abb7505aaf7cef08dedb3b4c82
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'P' =>
42
  public static function getInitializer(ClassLoader $loader)
43
  {
44
  return \Closure::bind(function () use ($loader) {
45
+ $loader->prefixLengthsPsr4 = ComposerStaticInitb74d70abb7505aaf7cef08dedb3b4c82::$prefixLengthsPsr4;
46
+ $loader->prefixDirsPsr4 = ComposerStaticInitb74d70abb7505aaf7cef08dedb3b4c82::$prefixDirsPsr4;
47
+ $loader->prefixesPsr0 = ComposerStaticInitb74d70abb7505aaf7cef08dedb3b4c82::$prefixesPsr0;
48
 
49
  }, null, ClassLoader::class);
50
  }