Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP7 - Uncaught TypeError - Exception.php #643

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions classes/Kohana/Kohana/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function __toString()
* @param Exception $e
* @return void
*/
public static function handler(Exception $e)
public static function handler($e)
{
$response = Kohana_Exception::_handler($e);

Expand All @@ -99,7 +99,7 @@ public static function handler(Exception $e)
* @param Exception $e
* @return Response
*/
public static function _handler(Exception $e)
public static function _handler($e)
{
try
{
Expand Down Expand Up @@ -137,7 +137,7 @@ public static function _handler(Exception $e)
* @param int $level
* @return void
*/
public static function log(Exception $e, $level = Log::EMERGENCY)
public static function log($e, $level = Log::EMERGENCY)
{
if (is_object(Kohana::$log))
{
Expand All @@ -160,8 +160,11 @@ public static function log(Exception $e, $level = Log::EMERGENCY)
* @param Exception $e
* @return string
*/
public static function text(Exception $e)
public static function text($e)
{
if ( ! $e instanceof Exception AND ! $e instanceof Throwable )
throw InvalidArgumentException;

return sprintf('%s [ %s ]: %s ~ %s [ %d ]',
get_class($e), $e->getCode(), strip_tags($e->getMessage()), Debug::path($e->getFile()), $e->getLine());
}
Expand All @@ -173,8 +176,11 @@ public static function text(Exception $e)
* @param Exception $e
* @return Response
*/
public static function response(Exception $e)
public static function response($e)
{
if ( ! $e instanceof Exception AND ! $e instanceof Throwable )
throw InvalidArgumentException;

try
{
// Get the exception information
Expand Down