소스 검색

[WebProfilerBundle] Do not display toolbar loading result if it's not a valid toolbar

Jordi Boggiano 14 년 전
부모
커밋
abd60ac345
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig

+ 1 - 1
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig

@@ -11,7 +11,7 @@
         xhr.open('GET', '{{ path("_wdt", { "token": token }) }}', true);
         xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
         xhr.onreadystatechange = function(state) {
-            if (4 === xhr.readyState && 200 === xhr.status) {
+            if (4 === xhr.readyState && 200 === xhr.status && '<!-- START' === xhr.responseText.substring(0, 10)) {
                 wdt.innerHTML = xhr.responseText;
                 wdt.style.display = 'block';
             }