Commit ecda61e
v1.7.44 — Fix JS crash in renderAssets: WP script src can be false not string
WordPress registers scripts/styles with src=false (inline-only assets).
PHP ?? operator doesn't catch false, so false was JSON-encoded as boolean
and passed to JS where .replace() and .toLowerCase() don't exist on it.
- PHP: use is_string() guard, cast to '' when not a string
- JS: String() coerce in truncate(), truncateUrl(), assets filter loop
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 6fe70fe commit ecda61e
3 files changed
+17
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
270 | | - | |
271 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| |||
1157 | 1157 | | |
1158 | 1158 | | |
1159 | 1159 | | |
1160 | | - | |
| 1160 | + | |
1161 | 1161 | | |
1162 | 1162 | | |
1163 | 1163 | | |
1164 | 1164 | | |
1165 | | - | |
| 1165 | + | |
1166 | 1166 | | |
1167 | 1167 | | |
1168 | 1168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
1712 | 1712 | | |
1713 | 1713 | | |
1714 | 1714 | | |
| 1715 | + | |
| 1716 | + | |
1715 | 1717 | | |
1716 | 1718 | | |
1717 | 1719 | | |
1718 | 1720 | | |
1719 | 1721 | | |
1720 | 1722 | | |
1721 | | - | |
| 1723 | + | |
1722 | 1724 | | |
1723 | | - | |
| 1725 | + | |
1724 | 1726 | | |
1725 | 1727 | | |
1726 | | - | |
1727 | | - | |
| 1728 | + | |
1728 | 1729 | | |
1729 | 1730 | | |
1730 | 1731 | | |
| |||
1734 | 1735 | | |
1735 | 1736 | | |
1736 | 1737 | | |
1737 | | - | |
| 1738 | + | |
1738 | 1739 | | |
1739 | | - | |
| 1740 | + | |
1740 | 1741 | | |
1741 | 1742 | | |
1742 | | - | |
| 1743 | + | |
1743 | 1744 | | |
1744 | 1745 | | |
1745 | 1746 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
0 commit comments