Skip to content

Commit 44bd82c

Browse files
committed
bug #38291 [OptionsResolver] Fix deprecation message access (fancyweb)
This PR was merged into the 5.1 branch. Discussion ---------- [OptionsResolver] Fix deprecation message access | Q | A | ------------- | --- | Branch? | 5.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - `$this->deprecated[$option]` cannot be a string, it's always an array. Commits ------- 232af42 [OptionsResolver] Fix deprecation message access
2 parents 79686c6 + 232af42 commit 44bd82c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/OptionsResolver/OptionsResolver.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,7 @@ public function offsetGet($option, bool $triggerDeprecation = true)
10671067

10681068
// Check whether the option is deprecated
10691069
// and it is provided by the user or is being called from a lazy evaluation
1070-
if ($triggerDeprecation && isset($this->deprecated[$option]) && (isset($this->given[$option]) || ($this->calling && \is_string($this->deprecated[$option])))) {
1070+
if ($triggerDeprecation && isset($this->deprecated[$option]) && (isset($this->given[$option]) || ($this->calling && \is_string($this->deprecated[$option]['message'])))) {
10711071
$deprecation = $this->deprecated[$option];
10721072
$message = $this->deprecated[$option]['message'];
10731073

0 commit comments

Comments
 (0)