mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-02 03:37:44 +08:00
Fixed bug that prepareHandler
cannot work sometimes for circuit-breaker
. (#6419)
This commit is contained in:
parent
c1b7d6ae42
commit
9ed7d0276e
@ -1,5 +1,9 @@
|
|||||||
# v3.1.4 - TBD
|
# v3.1.4 - TBD
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- [#6419](https://github.com/hyperf/hyperf/pull/6419) Fixed bug that `prepareHandler` cannot work sometimes for `circuit-breaker`.
|
||||||
|
|
||||||
## Optimized
|
## Optimized
|
||||||
|
|
||||||
- [#6415](https://github.com/hyperf/hyperf/pull/6415) Throw `InvalidArgumentException` instead of `TypeError` for decoding an empty string when using `Base62::decode`.
|
- [#6415](https://github.com/hyperf/hyperf/pull/6415) Throw `InvalidArgumentException` instead of `TypeError` for decoding an empty string when using `Base62::decode`.
|
||||||
|
@ -192,13 +192,13 @@ abstract class AbstractHandler implements HandlerInterface
|
|||||||
{
|
{
|
||||||
if (is_string($fallback)) {
|
if (is_string($fallback)) {
|
||||||
$fallback = explode('::', $fallback);
|
$fallback = explode('::', $fallback);
|
||||||
if (! isset($fallback[1]) && is_callable([$proceedingJoinPoint->className, $fallback[0]])) {
|
if (! isset($fallback[1]) && method_exists($proceedingJoinPoint->className, $fallback[0])) {
|
||||||
return [$proceedingJoinPoint->className, $fallback[0]];
|
return [$proceedingJoinPoint->className, $fallback[0]];
|
||||||
}
|
}
|
||||||
$fallback[1] ??= 'fallback';
|
$fallback[1] ??= 'fallback';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($fallback) && is_callable($fallback)) {
|
if (is_array($fallback) && count($fallback) === 2) {
|
||||||
return $fallback;
|
return $fallback;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user