Commit 94c2b34
committed
bug symfony#60809 [Serializer] Fix
This PR was merged into the 6.4 branch.
Discussion
----------
[Serializer] Fix `TraceableSerializer` when called from a callable inside `array_map`
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues |
| License | MIT
If the `TraceableSerializer` runs from a callable in an `array_map`, then the caller looses the file and the line because it was invoked. This causes a hard fail since the required items are not defined. The error is the following:
```
TraceableSerializer.php line 174:
Warning: Undefined array key "file".
```
The fix is to get the file and the line from the following array item which always is the caller class.
Commits
-------
490a110 Fix TraceableSerializer when collected caller from array mapTraceableSerializer when called from a callable inside array_map (OrestisZag)File tree
2 files changed
+36
-2
lines changed- src/Symfony/Component/Serializer
- Debug
- Tests/Debug
2 files changed
+36
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
183 | | - | |
| 182 | + | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| |||
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
129 | 163 | | |
130 | 164 | | |
131 | 165 | | |
| |||
0 commit comments