Skip to content

Commit

Permalink
Merge pull request #17664 from cakephp/5.0-cleanup
Browse files Browse the repository at this point in the history
Use constant instead of string.
  • Loading branch information
ADmad committed Apr 11, 2024
2 parents 70ad4c8 + 679ebe1 commit bb9d874
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ORM/EagerLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,9 @@ protected function _fixStrategies(): void
protected function _correctStrategy(EagerLoadable $loadable): void
{
$config = $loadable->getConfig();
$currentStrategy = $config['strategy'] ??
'join';
$currentStrategy = $config['strategy'] ?? Association::STRATEGY_JOIN;

if (!$loadable->canBeJoined() || $currentStrategy !== 'join') {
if (!$loadable->canBeJoined() || $currentStrategy !== Association::STRATEGY_JOIN) {
return;
}

Expand Down

0 comments on commit bb9d874

Please sign in to comment.