Verzeichnisstruktur phpBB-3.1.0
- Veröffentlicht
- 27.10.2014
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
error_collector.php
01 <?php
02 /**
03 *
04 * This file is part of the phpBB Forum Software package.
05 *
06 * @copyright (c) phpBB Limited <https://www.phpbb.com>
07 * @license GNU General Public License, version 2 (GPL-2.0)
08 *
09 * For full copyright and license information, please see
10 * the docs/CREDITS.txt file.
11 *
12 */
13
14 namespace phpbb;
15
16 class error_collector
17 {
18 var $errors;
19
20 function __construct()
21 {
22 $this->errors = array();
23 }
24
25 function install()
26 {
27 set_error_handler(array(&$this, 'error_handler'));
28 }
29
30 function uninstall()
31 {
32 restore_error_handler();
33 }
34
35 function error_handler($errno, $msg_text, $errfile, $errline)
36 {
37 $this->errors[] = array($errno, $msg_text, $errfile, $errline);
38 }
39
40 function format_errors()
41 {
42 $text = '';
43 foreach ($this->errors as $error)
44 {
45 if (!empty($text))
46 {
47 $text .= "<br />\n";
48 }
49
50 list($errno, $msg_text, $errfile, $errline) = $error;
51
52 // Prevent leakage of local path to phpBB install
53 $errfile = phpbb_filter_root_path($errfile);
54
55 $text .= "Errno $errno: $msg_text at $errfile line $errline";
56 }
57
58 return $text;
59 }
60 }
61