luvas2010 / rapyd-framework

Automatically exported from code.google.com/p/rapyd-framework
0 stars 0 forks source link

database.php show_error function #39

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Database errors with debug enabled will not be visible.

show_error function in database.php is calling rpd:error with only one 
attribute.

public static function error($code, $message='')
{
    self::$error_message = $message;
    self::run('error/code/'.$code);
    exit(1);
}

$message is empty and our error is in $code.
there are some other places where the changed error function does not work 
anymore, e.g. rapyd.php (l. 317) "self::error('The URL you entered contains 
illegal characters.');"

Original issue reported on code.google.com by nico.kru...@gmail.com on 20 Dec 2011 at 11:19

GoogleCodeExporter commented 9 years ago
solution is to uniform show_error functions (in many of main libraries) to work 
with rpd::error($code, $message)

$code was added after $message and I forgot to make changes in many files,
we can use 'error' as $code, for generic errors.

Original comment by felice.ostuni on 5 Jan 2012 at 10:17