Skip to content

Commit

Permalink
Merge tag '2.3.3'
Browse files Browse the repository at this point in the history
Hotfix release 2.3.3

- Fixed: Service callbacks without class names broken
  • Loading branch information
stefanheimes committed Nov 21, 2023
2 parents 3686eaa + 89e079a commit 0e7e189
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Contao/Callback/Callbacks.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* This file is part of contao-community-alliance/dc-general.
*
* (c) 2013-2019 Contao Community Alliance.
* (c) 2013-2023 Contao Community Alliance.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand All @@ -14,7 +14,8 @@
* @author Christian Schiffler <[email protected]>
* @author Tristan Lins <[email protected]>
* @author Sven Baumann <[email protected]>
* @copyright 2013-2019 Contao Community Alliance.
* @author Ingolf Steinhardt <[email protected]>
* @copyright 2013-2023 Contao Community Alliance.
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later
* @filesource
*/
Expand Down Expand Up @@ -118,15 +119,15 @@ public static function callArgs($callback, array $args = [])
/**
* Evaluate the callback and create an object instance if required and possible.
*
* @param array|array{0: class-string, 1: string}|callable $callback The callback to invoke.
* @param array|array{0: class-string|string, 1: string}|callable $callback The callback to invoke.
*
* @return array|callable
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*/
protected static function evaluateCallback($callback)
{
if (is_array($callback) && (2 === count($callback)) && class_exists($callback[0]) && is_string($callback[1])) {
if (is_array($callback) && (2 === count($callback)) && is_string($callback[0]) && is_string($callback[1])) {
$serviceCallback = static::evaluateServiceCallback($callback);
if ($serviceCallback[0] !== $callback[0]) {
return $serviceCallback;
Expand Down

0 comments on commit 0e7e189

Please sign in to comment.