PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
← All changes | src/TestData/Framework/ProviderForwarder.php +6 -0 4.15.34.16.9 View file →
@@ -10,8 +10,10 @@
10 10
11 11 /**
12 12 * Forward calls to a provider class.
13 13 *
14 + * @since 4.16.7.2 Verify the resolved provider implements the Provider contract.
15 + *
14 16 * @param string $name
15 17 * @param array $arguments
16 18 *
17 19 * @return mixed
@@ -18,8 +20,12 @@
18 20 */
19 21 public function __call($name, $arguments)
20 22 {
21 23 $provider = isset($this->loadedProviders[$name]) ? $this->loadedProviders[$name] : $this->loadProvider($name);
24 +
25 + if ( ! $provider instanceof Contract\Provider ) {
26 + return null;
27 + }
22 28
23 29 return call_user_func_array($this->loadedProviders[$name], $arguments);
24 30 }
25 31