Explorar el Código

[Debug] Show errors

Foppe Hemminga hace 5 años
padre
commit
4916fb73b5
Se han modificado 2 ficheros con 3 adiciones y 6 borrados
  1. 1 0
      index.php
  2. 2 6
      snippets.php

+ 1 - 0
index.php

@@ -140,6 +140,7 @@ assert( '$screen >= 0', "By now \$screen should be set to a value >= 0." );
                   $screen = 0;
               }
               // Choose or add a maintainer; default screen
+              print( "<pre>&{screen}</pre>" );
               print( $snippets[$screen] );
               ?>
           </div>

+ 2 - 6
snippets.php

@@ -1,9 +1,5 @@
 <?php
 
-ini_set('display_errors', 1);
-ini_set('display_startup_errors', 1);
-error_reporting(E_ALL);
-
 // This file contains HTML snippets for the several possible forms
 
 $pdo = null;
@@ -208,7 +204,7 @@ HTML;
 			$selected = ' selected';
 		}
 		$snippets[3] .= "\t\t\t\t<option${selected}>${property}</option>\n";
-	};
+	}
 	$snippets[3] .= <<<HTML
 			</select>
 			<input type="hidden" name="action" value="s">
@@ -225,7 +221,7 @@ HTML;
 
 }
 
-if ($screen == 4) {
+if ( $screen == 4 ) {
 	$query = <<<QUERY
 		SELECT value FROM player WHERE maintainer = ? AND player = ? AND property = 'name';
 QUERY;