Skip to content

Commit

Permalink
added some error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
HB9HIL committed Jan 23, 2024
1 parent a369e78 commit 3527f3f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion application/libraries/OptionsLib.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ function get_logo($logo_location) {

$logo = $CI->Themes_model->get_logo_from_theme($theme, $logo_location);

return $logo;
if ($logo != null) {
return $logo;
} else {
return 'no_logo_found';
}
}

}
1 change: 1 addition & 0 deletions application/models/Themes_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ function get_logo_from_theme($theme, $logo_location) {

return ($value !== null) ? (string) $value : null;
} else {
log_message('error', 'get_logo_from_theme failed');
return null;
}
}
Expand Down
Binary file added assets/logo/no_logo_found.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3527f3f

Please sign in to comment.