Skip to content

Commit ad46c8a

Browse files
committed
Fix for PHP Console errors showing up on black background when you do not select a project.
1 parent 862b27c commit ad46c8a

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

assets/js/php-console.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ var editor;
7575
var params = '?js=1&' + window.location.href.slice(window.location.href.indexOf('?') + 1) + '&isAdmin=' + ($('#run_as_admin').is(':checked') ? '0' : '1');
7676

7777
$.post(params, { code: editor.getSession().getValue() }, function(res) {
78-
if (res.match(/#end-php-console-output#$/)) {
78+
if (res.match(/#end-php-console-output#$/) && !res.match('xdebug-error')) {
7979
$('div.output.xmp').html('<xmp class="prettyprint linenums">' + res.substring(0, res.length-24) + '</xmp>');
8080
$('div.output.pre').html('<pre class="prettyprint linenums">' + res.substring(0, res.length-24) + '</pre>');
8181
} else {
@@ -106,6 +106,9 @@ var editor;
106106
// tab size
107107
editor.getSession().setTabSize(options.tabsize);
108108
editor.getSession().setUseSoftTabs(true);
109+
editor.setOptions({
110+
wrap: true
111+
});
109112

110113
// Theme
111114

assets/sass/styles.scss

+5
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ input {
6969
}
7070
}
7171

72+
.xdebug-error, .xe-warning {
73+
background: $white;
74+
color: $black;
75+
}
76+
7277

7378
.statusbar {
7479
padding: 0 5px;

assets/styles/styles.css

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/styles/styles.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22
ini_set('memory_limit', '1G');
33
ini_set('display_errors', 1);
4+
error_reporting(E_ALL | E_STRICT);
45

56
$options = array(
67
// which string should represent a tab for indentation
@@ -63,9 +64,6 @@
6364
define('PHP_CONSOLE_VERSION', '1.3.0-dev');
6465
require 'krumo/class.krumo.php';
6566

66-
ini_set('display_errors', 1);
67-
error_reporting(E_ALL | E_STRICT);
68-
6967
$debugOutput = '';
7068

7169
if (isset($_POST['code'])) {
@@ -149,8 +147,8 @@
149147
<li>
150148
<label for="options-editor">Editor Orientation?</label>
151149
<select class="options-editor" name="options-editor">
152-
<option value="hor">Horizontal</option>
153150
<option value="vert">Vertical</option>
151+
<option value="hor">Horizontal</option>
154152
</select>
155153
</li>
156154
</ul>

0 commit comments

Comments
 (0)