Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
e226a463
Commit
e226a463
authored
Nov 16, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactoring.
parent
6bd3dcb0
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
27 deletions
+38
-27
error.php
application/config/error.php
+19
-8
core.php
laravel/bootstrap/core.php
+1
-0
hash.php
laravel/hash.php
+4
-5
laravel.php
laravel/laravel.php
+13
-6
request.php
laravel/request.php
+0
-7
uri.php
laravel/uri.php
+1
-1
No files found.
application/config/error.php
View file @
e226a463
...
@@ -2,6 +2,19 @@
...
@@ -2,6 +2,19 @@
return
array
(
return
array
(
/*
|--------------------------------------------------------------------------
| Ignored Error Levels
|--------------------------------------------------------------------------
|
| Here you may specify the error levels that should be ignored by the
| Laravel error handler. These levels will still be logged; however, no
| information about about them will be displayed.
|
*/
'ignore'
=>
array
(
E_NOTICE
,
E_USER_NOTICE
,
E_DEPRECATED
,
E_USER_DEPRECATED
),
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Error Detail
| Error Detail
...
@@ -29,7 +42,7 @@ return array(
...
@@ -29,7 +42,7 @@ return array(
|
|
*/
*/
'log'
=>
fals
e
,
'log'
=>
tru
e
,
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
...
@@ -46,17 +59,15 @@ return array(
...
@@ -46,17 +59,15 @@ return array(
| a single text file within the application storage directory.
| a single text file within the application storage directory.
|
|
| Of course, you are free to implement more complex solutions including
| Of course, you are free to implement more complex solutions including
| e
-
mailing the exceptions details to your team, etc.
| emailing the exceptions details to your team, etc.
|
|
*/
*/
'logger'
=>
function
(
$e
,
$config
)
'logger'
=>
function
(
$e
xception
)
{
{
$format
=
'%s | Message: %s | File: %s | Line: %s'
;
$message
=
(
string
)
$exception
;
$message
=
sprintf
(
$format
,
date
(
'Y-m-d H:i:s'
),
$e
->
getMessage
(),
$e
->
getFile
(),
$e
->
getLine
());
File
::
append
(
STORAGE_PATH
.
'log.txt'
,
$message
.
PHP_EOL
);
File
::
append
(
STORAGE_PATH
.
'log.txt'
,
date
(
'Y-m-d H:i:s'
)
.
' - '
.
$message
.
PHP_EOL
);
}
}
,
);
);
\ No newline at end of file
laravel/bootstrap/core.php
View file @
e226a463
...
@@ -58,6 +58,7 @@ require SYS_PATH.'autoloader'.EXT;
...
@@ -58,6 +58,7 @@ require SYS_PATH.'autoloader'.EXT;
*/
*/
Config
::
load
(
'application'
);
Config
::
load
(
'application'
);
Config
::
load
(
'session'
);
Config
::
load
(
'session'
);
Config
::
load
(
'error'
);
/**
/**
* Register the Autoloader's "load" method on the auto-loader stack.
* Register the Autoloader's "load" method on the auto-loader stack.
...
...
laravel/hash.php
View file @
e226a463
...
@@ -5,11 +5,10 @@ class Hash {
...
@@ -5,11 +5,10 @@ class Hash {
/**
/**
* Hash a password using the Bcrypt hashing scheme.
* Hash a password using the Bcrypt hashing scheme.
*
*
* Bcrypt provides a future-proof hashing algorithm by allowing the
* Bcrypt provides a future-proof hashing algorithm by allowing the number of
* number of "rounds" to be increased, thus increasing the time it
* "rounds" to be increased, thus increasing the time it takes to generate the
* takes to generate the hashed value. The longer it takes takes
* hashed value. The longer it takes takes to generate the hash, the more
* to generate the hash, the more impractical a rainbow table
* impractical a rainbow table attack against the hashes becomes.
* attack against the hashes becomes.
*
*
* <code>
* <code>
* // Create a Bcrypt hash of a value
* // Create a Bcrypt hash of a value
...
...
laravel/laravel.php
View file @
e226a463
...
@@ -23,16 +23,16 @@ date_default_timezone_set(Config::$items['application']['timezone']);
...
@@ -23,16 +23,16 @@ date_default_timezone_set(Config::$items['application']['timezone']);
*/
*/
$handler
=
function
(
$exception
)
$handler
=
function
(
$exception
)
{
{
$config
=
Config
::
get
(
'error'
)
;
$config
=
Config
::
$items
[
'error'
]
;
if
(
$config
[
'log'
])
if
(
$config
[
'log'
])
{
{
call_user_func
(
$config
[
'logger'
],
$exception
,
$config
);
call_user_func
(
$config
[
'logger'
],
$exception
);
}
}
if
(
$config
[
'detail'
])
if
(
$config
[
'detail'
])
{
{
echo
"<html><h2>Un
caught
Exception</h2>
echo
"<html><h2>Un
handled
Exception</h2>
<h3>Message:</h3>
<h3>Message:</h3>
<pre>"
.
$exception
->
getMessage
()
.
"</pre>
<pre>"
.
$exception
->
getMessage
()
.
"</pre>
<h3>Location:</h3>
<h3>Location:</h3>
...
@@ -44,6 +44,8 @@ $handler = function($exception)
...
@@ -44,6 +44,8 @@ $handler = function($exception)
{
{
Response
::
error
(
'500'
)
->
send
();
Response
::
error
(
'500'
)
->
send
();
}
}
exit
(
1
);
};
};
/**
/**
...
@@ -61,9 +63,14 @@ set_exception_handler(function($exception) use ($handler)
...
@@ -61,9 +63,14 @@ set_exception_handler(function($exception) use ($handler)
* handler, which will convert the error into an ErrorException object
* handler, which will convert the error into an ErrorException object
* and pass the exception into the common exception handler.
* and pass the exception into the common exception handler.
*/
*/
set_error_handler
(
function
(
$number
,
$error
,
$file
,
$line
)
use
(
$handler
)
set_error_handler
(
function
(
$number
,
$error
,
$file
,
$line
)
{
{
$handler
(
new
\ErrorException
(
$error
,
$number
,
0
,
$file
,
$line
));
if
(
error_reporting
()
===
0
or
in_array
(
$number
,
Config
::
$items
[
'error'
][
'ignore'
]))
{
return
;
}
throw
new
\ErrorException
(
$error
,
$number
,
0
,
$file
,
$line
);
});
});
/**
/**
...
...
laravel/request.php
View file @
e226a463
...
@@ -2,13 +2,6 @@
...
@@ -2,13 +2,6 @@
class
Request
{
class
Request
{
/**
* The request URI for the current request.
*
* @var string
*/
public
static
$uri
;
/**
/**
* The route handling the current request.
* The route handling the current request.
*
*
...
...
laravel/uri.php
View file @
e226a463
...
@@ -7,7 +7,7 @@ class URI {
...
@@ -7,7 +7,7 @@ class URI {
*
*
* @var string
* @var string
*/
*/
p
rotected
static
$uri
;
p
ublic
static
$uri
;
/**
/**
* The URI segments for the current request.
* The URI segments for the current request.
...
...
Write
Preview
Markdown
is supported
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