Skip to content

Commit d37a65e

Browse files
committed
Merge branch '5.4' into 6.3
* 5.4: [WebProfilerBundle] Fix JS error when evaluating scripts don't fail when optional dependencies are not present fix syntax error on PHP 7.2
2 parents 64d774d + 8b3344d commit d37a65e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Resources/views/Profiler/base_js.html.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,9 @@ if (typeof Sfjs === 'undefined' || typeof Sfjs.loadToolbar === 'undefined') {
565565
/* Evaluate in global scope scripts embedded inside the toolbar */
566566
var i, scripts = [].slice.call(el.querySelectorAll('script'));
567567
for (i = 0; i < scripts.length; ++i) {
568-
eval.call({}, scripts[i].firstChild.nodeValue);
568+
if (scripts[i].firstChild) {
569+
eval.call({}, scripts[i].firstChild.nodeValue);
570+
}
569571
}
570572
571573
el.style.display = -1 !== xhr.responseText.indexOf('sf-toolbarreset') ? 'block' : 'none';

0 commit comments

Comments
 (0)