{"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":"31b5932c4b4ca1fb69797d552e40b2ef0fbc52e745d508553e67ff426ad5fb44","isBugfix":0.9691,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.943,"feature":0.0062,"refactor":0.0323,"tests_only":0.0072,"docs_only":0.0048,"dependency":0.0065},"confidence":0.8686},"scope":{"score":1.0301,"probabilities":{"0":0.2384,"1":0.4931,"2":0.2685},"confidence":0.0581},"risk":{"score":0.6545,"probabilities":{"0":0.365,"1":0.6155,"2":0.0195},"confidence":0.2686},"area":{"choice":"frontend","probabilities":{"catalog":0.0032,"checkout":0.0028,"customer":0.0024,"admin":0.005,"graphql_api":0.002,"framework":0.0198,"frontend":0.9584,"other":0.0064},"confidence":0.9074},"securityRelevant":0.0759,"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.0028,"2.4.2-p1":0.0031,"2.4.2-p2":0.0036,"2.4.3":0.0039,"2.4.3-p1":0.0041,"2.4.3-p2":0.0049,"2.4.3-p3":0.0039,"2.4.4":0.0033,"2.4.4-p1":0.0033,"2.4.4-p10":0.0042,"2.4.4-p11":0.005,"2.4.4-p12":0.0042,"2.4.4-p13":0.0041,"2.4.4-p14":0.0041,"2.4.4-p15":0.0041,"2.4.4-p16":0.0042,"2.4.4-p17":0.004,"2.4.4-p18":0.0042,"2.4.4-p2":0.0026,"2.4.4-p3":0.0029,"2.4.4-p4":0.0033,"2.4.4-p5":0.0034,"2.4.4-p6":0.0039,"2.4.4-p7":0.0044,"2.4.4-p8":0.0039,"2.4.4-p9":0.0035,"2.4.5":0.0039,"2.4.5-p1":0.0032,"2.4.5-p10":0.003,"2.4.5-p11":0.0041,"2.4.5-p12":0.0053,"2.4.5-p13":0.0042,"2.4.5-p14":0.0054,"2.4.5-p15":0.0036,"2.4.5-p16":0.005,"2.4.5-p17":0.0039,"2.4.5-p2":0.0028,"2.4.5-p3":0.0029,"2.4.5-p4":0.0033,"2.4.5-p5":0.0033,"2.4.5-p6":0.0038,"2.4.5-p7":0.0044,"2.4.5-p8":0.0038,"2.4.5-p9":0.003,"2.4.6":0.0082,"2.4.6-p1":0.0095,"2.4.6-p10":0.0101,"2.4.6-p11":0.0096,"2.4.6-p12":0.0105,"2.4.6-p13":0.0066,"2.4.6-p14":0.0075,"2.4.6-p15":0.0062,"2.4.6-p2":0.0033,"2.4.6-p3":0.0043,"2.4.6-p4":0.0056,"2.4.6-p5":0.0049,"2.4.6-p6":0.0068,"2.4.6-p7":0.0081,"2.4.6-p8":0.0059,"2.4.6-p9":0.0038,"2.4.7":0.4899,"2.4.7-p1":0.0294,"2.4.7-p10":0.0132,"2.4.7-p2":0.0118,"2.4.7-p3":0.0141,"2.4.7-p4":0.0157,"2.4.7-p5":0.0113,"2.4.7-p6":0.0157,"2.4.7-p7":0.0196,"2.4.7-p8":0.0132,"2.4.7-p9":0.0121,"2.4.8":0.0064,"2.4.8-p1":0.0067,"2.4.8-p2":0.0068,"2.4.8-p3":0.0073,"2.4.8-p4":0.0076,"2.4.8-p5":0.0066,"2.4.9":0.0076,"unspecified":0.0155},"confidence":0.2356},"backportWorthy":{"score":1.6118,"probabilities":{"0":0.0814,"1":0.2254,"2":0.6932},"confidence":0.3069}},"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"}