PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
← All changes | vendor_prefixed/guzzlehttp/guzzle/src/HandlerStack.php +12 -4 27.6 → trunk View file →
@@ -160,14 +160,22 @@
160 160 */
161 161 public function remove($remove) : void
162 162 {
163 163 if (!\is_string($remove) && !\is_callable($remove)) {
164 - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a callable or string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__);
164 + \YoastSEO_Vendor\trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a callable or string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__);
165 165 }
166 166 $this->cached = null;
167 - $idx = \is_callable($remove) ? 0 : 1;
168 - $this->stack = \array_values(\array_filter($this->stack, static function ($tuple) use($idx, $remove) {
169 - return $tuple[$idx] !== $remove;
167 + if (\is_string($remove)) {
168 + $count = \count($this->stack);
169 + $this->stack = \array_values(\array_filter($this->stack, static function ($tuple) use($remove) {
170 + return $tuple[1] !== $remove;
171 + }));
172 + if ($count !== \count($this->stack) || !\is_callable($remove)) {
173 + return;
174 + }
175 + }
176 + $this->stack = \array_values(\array_filter($this->stack, static function ($tuple) use($remove) {
177 + return $tuple[0] !== $remove;
170 178 }));
171 179 }
172 180 /**
173 181 * Compose the middleware and handler into a single callable function.