mirror of
https://github.com/easy-wi/developer.git
synced 2025-02-20 11:23:28 +08:00
#289: Catch Exceptions from GameQ at image.php
This commit is contained in:
parent
06713e866e
commit
f501bd8188
@ -155,19 +155,24 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$reflection = new ReflectionClass($class_name);
|
||||
|
||||
// Check to make sure we can actually load the class
|
||||
if(!$reflection->IsInstantiable())
|
||||
{
|
||||
continue;
|
||||
try {
|
||||
|
||||
if(!$reflection->IsInstantiable()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Load up the class so we can get info
|
||||
$class = new $class_name;
|
||||
|
||||
// Add it to the list
|
||||
$protocols[$class->name()] = $class->name_long();
|
||||
|
||||
// Unset the class
|
||||
unset($class);
|
||||
} catch (ReflectionException $e) {
|
||||
$errors['reflection'] = $e->getMessage();
|
||||
}
|
||||
|
||||
// Load up the class so we can get info
|
||||
$class = new $class_name;
|
||||
|
||||
// Add it to the list
|
||||
$protocols[$class->name()] = $class->name_long();
|
||||
|
||||
// Unset the class
|
||||
unset($class);
|
||||
}
|
||||
|
||||
// Close the directory
|
||||
|
Loading…
x
Reference in New Issue
Block a user