Skip to content

Commit

Permalink
fixed undefineds for Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketMan committed Sep 13, 2021
1 parent 4388ee3 commit 707b052
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ui/Home.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private function emitTopPlays($numweeks=1, $limit=10) {
if(! isset($y) || !$y)
return; // No charts! bail.

if(!$numWeeks || $numWeeks == 1)
if(!$numweeks || $numweeks == 1)
Engine::api(IChart::class)->getChart($topPlays, "", $lastWeek["week"], $limit);
else {
// Determine start chart date that will yield $numweeks worth of charts
Expand Down
3 changes: 3 additions & 0 deletions ui/UICommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ class UICommon {
* return the URL of the current request, less leaf filename, if any
*/
public static function getBaseUrl() {
if(php_sapi_name() == "cli")
return "";

$uri = $_SERVER['REQUEST_URI'];

// strip the query string, if any
Expand Down

0 comments on commit 707b052

Please sign in to comment.