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
if (strlen($ext) > 3) return $api_path;
if (strlen($ext) > 3)
{
return $api_path;
}
$img_cache_path = $this->config->get('img_cache_path');
$cached_image = "{$series_slug}.{$ext}";

View File

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

View File

@ -128,7 +128,10 @@ class UrlGenerator extends RoutingBase {
if ($path === '')
{
$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);

View File

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

View File

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