N°8834 - Add compatibility with PHP 8.4 (#819)

* N°8834 - Add compatibility with PHP 8.4

* Rollback of scssphp/scssphp version upgrade due to compilation error
This commit is contained in:
Lenaick
2026-02-26 10:36:32 +01:00
committed by GitHub
parent d4821b7edc
commit fc967c06ce
961 changed files with 12298 additions and 7130 deletions

View File

@@ -413,11 +413,7 @@
renderAjaxRequests: renderAjaxRequests,
getSfwdt: function(token) {
if (!this.sfwdt) {
this.sfwdt = document.getElementById('sfwdt' + token);
}
return this.sfwdt;
return document.getElementById('sfwdt' + token);
},
load: function(selector, url, onSuccess, onError, options) {
@@ -433,7 +429,7 @@
var pending = pendingRequests;
for (var i = 0; i < requestStack.length; i++) {
startAjaxRequest(i);
if (requestStack[i].duration) {
if (requestStack[i].duration || requestStack[i].error) {
finishAjaxRequest(i);
}
}
@@ -542,11 +538,16 @@
'sfwdt' + token,
'{{ url("_wdt", { "token": "xxxxxx" })|escape('js') }}'.replace(/xxxxxx/, newToken),
function(xhr, el) {
var toolbarContent = document.getElementById('sfToolbarMainContent-' + newToken);
/* Do nothing in the edge case where the toolbar has already been replaced with a new one */
if (!document.getElementById('sfToolbarMainContent-' + newToken)) {
if (!toolbarContent) {
return;
}
/* Replace the ID, it has to match the new token */
toolbarContent.parentElement.id = 'sfwdt' + newToken;
/* Evaluate in global scope scripts embedded inside the toolbar */
var i, scripts = [].slice.call(el.querySelectorAll('script'));
for (i = 0; i < scripts.length; ++i) {