Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
8aaa9488
Commit
8aaa9488
authored
Oct 06, 2006
by
Nigel McNie
Committed by
Nigel McNie
Oct 06, 2006
Browse files
Removed the crappy error handlers, and include the error handling library.
parent
b0fe7817
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/init.php
View file @
8aaa9488
...
...
@@ -21,17 +21,6 @@
// @todo <nigel> Set up error handling. For now, use trigger_error. I will
// update all calls as necessary once error handling is finalised.
set_error_handler
(
'error'
);
set_exception_handler
(
'exception'
);
function
error
(
$code
,
$message
,
$file
,
$lines
,
$vars
)
{
echo
"
$code
:
$message
in
$file
on line
$line
<br>"
;
}
function
exception
(
$e
)
{
echo
$e
;
}
$CFG
=
new
StdClass
;
$CFG
->
docroot
=
dirname
(
__FILE__
)
.
'/'
;
...
...
@@ -45,6 +34,9 @@ else {
}
set_include_path
(
'.'
.
PATH_SEPARATOR
.
$CFG
->
libroot
);
// Set up error handling
require
'errors.php'
;
if
(
!
is_readable
(
$CFG
->
docroot
.
'config.php'
))
{
trigger_error
(
'Not installed! Please create config.php from config-dist.php'
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment