More quality fixes

This commit is contained in:
Timothy Warren 2015-11-09 11:10:15 -05:00
parent 0cd30e811d
commit e6b4fe59a3
5 changed files with 14 additions and 8 deletions

View File

@ -62,7 +62,10 @@ class Model {
} }
// Failsafe for weird urls // Failsafe for weird urls
if (strlen($ext) > 3) return $api_path; if (strlen($ext) > 3)
{
return $api_path;
}
$img_cache_path = $this->config->get('img_cache_path'); $img_cache_path = $this->config->get('img_cache_path');
$cached_image = "{$series_slug}.{$ext}"; $cached_image = "{$series_slug}.{$ext}";

View File

@ -85,9 +85,7 @@ class RoutingBase {
public function segments() public function segments()
{ {
$path = $this->path(); $path = $this->path();
$segments = explode('/', $path); return explode('/', $path);
return $segments;
} }
/** /**

View File

@ -128,7 +128,10 @@ class UrlGenerator extends RoutingBase {
if ($path === '') if ($path === '')
{ {
$path .= trim($config_default_route, '/'); $path .= trim($config_default_route, '/');
if ($this->__get('default_to_list_view')) $path .= '/list'; if ($this->__get('default_to_list_view'))
{
$path .= '/list';
}
} }
return $this->url($path); return $this->url($path);

View File

@ -110,7 +110,10 @@ class Friend {
} }
// Return NULL on any exception, so no further logic needed // Return NULL on any exception, so no further logic needed
// in the catch block // in the catch block
catch (\Exception $e) {} catch (\Exception $e)
{
return NULL;
}
return NULL; return NULL;
} }

View File

@ -205,8 +205,7 @@ class ArrayType {
{ {
if (empty($pos) || ! is_array($pos)) if (empty($pos) || ! is_array($pos))
{ {
$pos = NULL; return NULL;
return $pos;
} }
$pos =& $pos[$level]; $pos =& $pos[$level];
} }