Commit edd6885
committed
Block Supports: Prevent fatal error in
Adds type checks to `get_slug_from_attribute()`, `is_preset()`, and `get_all_global_style_block_names()` to handle cases where the duotone attribute is an array of custom colors instead of a preset reference string.
This prevents an error when `preg_match()` receives an array instead of a string.
Props jorgefilipecosta, westonruter, xavilc.
Fixes #64612.
git-svn-id: https://develop.svn.wordpress.org/trunk@61603 602fd350-edb4-49c9-b593-d223f7449a82WP_Duotone when the duotone attribute is an array.1 parent 55227eb commit edd6885
2 files changed
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
549 | | - | |
550 | | - | |
| 549 | + | |
| 550 | + | |
551 | 551 | | |
552 | 552 | | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
553 | 557 | | |
554 | 558 | | |
555 | 559 | | |
| |||
566 | 570 | | |
567 | 571 | | |
568 | 572 | | |
569 | | - | |
| 573 | + | |
570 | 574 | | |
571 | 575 | | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
572 | 580 | | |
573 | 581 | | |
574 | 582 | | |
| |||
1050 | 1058 | | |
1051 | 1059 | | |
1052 | 1060 | | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
1053 | 1066 | | |
1054 | 1067 | | |
1055 | 1068 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
| |||
164 | 166 | | |
165 | 167 | | |
166 | 168 | | |
| 169 | + | |
| 170 | + | |
167 | 171 | | |
168 | 172 | | |
169 | 173 | | |
| |||
0 commit comments