{"data":{"id":"magento2-39398","source":"github-pr","sourceRef":"magento/magento2#39398","title":"Magento_Theme title.phtml template invalid for PHP 8.2","pr":{"number":39398,"url":"https://github.com/magento/magento2/pull/39398","author":"magentoabu","mergedAt":"2025-04-02T23:52:44Z","mergeCommit":"f7a9e529ef7fd79001674c3ad545a928133b2f65","headCommit":"48429198b612f851a7702e73b5a6072fb5394d46","baseRef":"2.4-develop","diffSha256":"99702f58af22f0db1824a00744eaf20dbc2e5e25d8ec090e051ee17875761528"},"issues":[{"number":39092,"url":"https://github.com/magento/magento2/issues/39092","title":"Magento_Theme title.phtml template invalid for PHP 8.2","labels":["Area: Framework","Component: UiComponents","Issue: Confirmed","Priority: P3","Progress: PR in progress","Progress: done","Reported on 2.4.7","Reproduced on 2.4.x","Triage: Dev.Experience"],"kind":"human"}],"fixedIn":"2.4.9","containingTags":["2.4.9"],"reportedOn":"2.4.7","codeMatch":{"2.4.6":"clean","2.4.6-p1":"clean","2.4.6-p2":"clean","2.4.6-p3":"clean","2.4.6-p4":"clean","2.4.6-p5":"clean","2.4.6-p6":"clean","2.4.6-p7":"clean","2.4.6-p8":"clean","2.4.6-p9":"clean","2.4.6-p10":"clean","2.4.6-p11":"clean","2.4.6-p12":"clean","2.4.6-p13":"clean","2.4.6-p14":"clean","2.4.6-p15":"clean","2.4.7":"clean","2.4.7-p1":"clean","2.4.7-p2":"clean","2.4.7-p3":"clean","2.4.7-p4":"clean","2.4.7-p5":"clean","2.4.7-p6":"clean","2.4.7-p7":"clean","2.4.7-p8":"clean","2.4.7-p9":"clean","2.4.7-p10":"clean","2.4.8":"clean","2.4.8-p1":"clean","2.4.8-p2":"clean","2.4.8-p3":"clean","2.4.8-p4":"clean","2.4.8-p5":"clean","2.4.9":"conflict"},"affectedVersions":["2.4.6","2.4.6-p1","2.4.6-p2","2.4.6-p3","2.4.6-p4","2.4.6-p5","2.4.6-p6","2.4.6-p7","2.4.6-p8","2.4.6-p9","2.4.6-p10","2.4.6-p11","2.4.6-p12","2.4.6-p13","2.4.6-p14","2.4.6-p15","2.4.7","2.4.7-p1","2.4.7-p2","2.4.7-p3","2.4.7-p4","2.4.7-p5","2.4.7-p6","2.4.7-p7","2.4.7-p8","2.4.7-p9","2.4.7-p10","2.4.8","2.4.8-p1","2.4.8-p2","2.4.8-p3","2.4.8-p4","2.4.8-p5"],"components":["magento/module-theme"],"files":[{"path":"app/code/Magento/Theme/view/frontend/templates/html/title.phtml","change":"modified","package":"magento/module-theme"}],"stripped":{"tests":[],"docs":[],"outsideCode":[]},"linesChanged":28,"mergeBatched":false,"excluded":null,"sections":{"description":"Template crashes if there's no page title.","stepsToReproduce":"There's a code error in vendor\\magento\\module-theme\\view\\frontend\\templates\\html\\title.phtml","expectedResult":"Should be written for PHP 8.2 but is not.","actualResult":"Template crashes if there's no page title.","source":"issue"},"signatures":[],"labels":{"area":["Framework"],"component":["UiComponents"],"priority":"P3","severity":null,"reportedOn":["2.4.7"]},"categories":[],"triage":{"model":"@cf/cloudflare/clef","requestHash":"fdd1e79b53937fa8ddd27b1bdadef092f2dc5a8245c64a9ed71b8b6d36de19cc","isBugfix":0.9667,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.9226,"feature":0.0059,"refactor":0.0255,"tests_only":0.0068,"docs_only":0.0046,"dependency":0.0055,"cleanup":0.0291},"confidence":0.8282},"scope":{"score":1.0027,"probabilities":{"0":0.2543,"1":0.4887,"2":0.257},"confidence":0.0544},"risk":{"score":0.644,"probabilities":{"0":0.3758,"1":0.6044,"2":0.0198},"confidence":0.2604},"area":{"choice":"frontend","probabilities":{"catalog":0.0034,"checkout":0.0029,"customer":0.0026,"admin":0.005,"graphql_api":0.0021,"framework":0.0205,"frontend":0.9568,"other":0.0067},"confidence":0.9041},"securityRelevant":0.071,"reportedVersion":{"choice":"2.4.7","probabilities":{"2.4.0":0.0026,"2.4.0-p1":0.0028,"2.4.1":0.0025,"2.4.1-p1":0.0029,"2.4.2":0.0027,"2.4.2-p1":0.003,"2.4.2-p2":0.0032,"2.4.3":0.0033,"2.4.3-p1":0.0037,"2.4.3-p2":0.0044,"2.4.3-p3":0.004,"2.4.4":0.003,"2.4.4-p1":0.0032,"2.4.4-p10":0.0044,"2.4.4-p11":0.0049,"2.4.4-p12":0.005,"2.4.4-p13":0.0048,"2.4.4-p14":0.0055,"2.4.4-p15":0.0046,"2.4.4-p16":0.0045,"2.4.4-p17":0.0045,"2.4.4-p18":0.0044,"2.4.4-p2":0.0026,"2.4.4-p3":0.003,"2.4.4-p4":0.0034,"2.4.4-p5":0.0034,"2.4.4-p6":0.0039,"2.4.4-p7":0.0042,"2.4.4-p8":0.0036,"2.4.4-p9":0.0033,"2.4.5":0.0034,"2.4.5-p1":0.0031,"2.4.5-p10":0.0031,"2.4.5-p11":0.0041,"2.4.5-p12":0.0054,"2.4.5-p13":0.0044,"2.4.5-p14":0.0042,"2.4.5-p15":0.0035,"2.4.5-p16":0.0047,"2.4.5-p17":0.004,"2.4.5-p2":0.003,"2.4.5-p3":0.0031,"2.4.5-p4":0.0038,"2.4.5-p5":0.0035,"2.4.5-p6":0.0038,"2.4.5-p7":0.0046,"2.4.5-p8":0.0041,"2.4.5-p9":0.003,"2.4.6":0.0077,"2.4.6-p1":0.0084,"2.4.6-p10":0.0086,"2.4.6-p11":0.0089,"2.4.6-p12":0.0079,"2.4.6-p13":0.0072,"2.4.6-p14":0.0071,"2.4.6-p15":0.0062,"2.4.6-p2":0.0033,"2.4.6-p3":0.0046,"2.4.6-p4":0.0061,"2.4.6-p5":0.0059,"2.4.6-p6":0.0083,"2.4.6-p7":0.0075,"2.4.6-p8":0.0057,"2.4.6-p9":0.0037,"2.4.7":0.4985,"2.4.7-p1":0.0286,"2.4.7-p10":0.0133,"2.4.7-p2":0.013,"2.4.7-p3":0.0134,"2.4.7-p4":0.0143,"2.4.7-p5":0.011,"2.4.7-p6":0.0164,"2.4.7-p7":0.0178,"2.4.7-p8":0.0126,"2.4.7-p9":0.0111,"2.4.8":0.0057,"2.4.8-p1":0.0065,"2.4.8-p2":0.0076,"2.4.8-p3":0.0077,"2.4.8-p4":0.0074,"2.4.8-p5":0.0068,"2.4.9":0.0063,"unspecified":0.0148},"confidence":0.2439},"backportWorthy":{"score":1.5836,"probabilities":{"0":0.0878,"1":0.2408,"2":0.6714},"confidence":0.2747}},"curated":{"title":"Fixes the page title template crash when there is no page heading","description":"The Magento_Theme title.phtml template crashes if there's no page title, for example a new cms page without title. The template now calls trim() on the page heading only if getPageHeading() is not null, and uses $escaper->escapeHtml() for the heading.","categories":[],"author":"claude-code/opus-5.5","date":"2026-10-06","reviewedBy":null},"tests":null},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-39398 details"}