diff --git a/app/Theming/ThemeService.php b/app/Theming/ThemeService.php index 6fe80559e..602abaf1c 100644 --- a/app/Theming/ThemeService.php +++ b/app/Theming/ThemeService.php @@ -49,7 +49,7 @@ class ThemeService public function readThemeActions() { $themeActionsFile = theme_path('functions.php'); - if (file_exists($themeActionsFile)) { + if ($themeActionsFile && file_exists($themeActionsFile)) { require $themeActionsFile; } } diff --git a/app/Translation/FileLoader.php b/app/Translation/FileLoader.php index 1ed7b06cc..775eefc47 100644 --- a/app/Translation/FileLoader.php +++ b/app/Translation/FileLoader.php @@ -24,9 +24,9 @@ class FileLoader extends BaseLoader } if (is_null($namespace) || $namespace === '*') { - $themeTranslations = $this->loadPath(theme_path('lang'), $locale, $group); - $originalTranslations = $this->loadPath($this->path, $locale, $group); - + $themePath = theme_path('lang'); + $themeTranslations = $themePath ? $this->loadPath($themePath, $locale, $group) : []; + $originalTranslations = $this->loadPath($this->path, $locale, $group); return array_merge($originalTranslations, $themeTranslations); } diff --git a/app/helpers.php b/app/helpers.php index 618c71bee..9edc22c40 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -99,13 +99,15 @@ function setting(string $key = null, $default = null) /** * Get a path to a theme resource. + * Returns null if a theme is not configured and + * therefore a full path is not available for use. */ -function theme_path(string $path = ''): string +function theme_path(string $path = ''): ?string { $theme = config('view.theme'); if (!$theme) { - return ''; + return null; } return base_path('themes/' . $theme . ($path ? DIRECTORY_SEPARATOR . $path : $path)); diff --git a/composer.lock b/composer.lock index 0647038cc..29ec67fed 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "aws/aws-sdk-php", - "version": "3.185.2", + "version": "3.185.6", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "0e6ece3f9c4ab26bb20183c697fd36e1d55c1053" + "reference": "35310302912fdc3b4a0e829b84424c41e3fd9727" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/0e6ece3f9c4ab26bb20183c697fd36e1d55c1053", - "reference": "0e6ece3f9c4ab26bb20183c697fd36e1d55c1053", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/35310302912fdc3b4a0e829b84424c41e3fd9727", + "reference": "35310302912fdc3b4a0e829b84424c41e3fd9727", "shasum": "" }, "require": { @@ -92,9 +92,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.185.2" + "source": "https://github.com/aws/aws-sdk-php/tree/3.185.6" }, - "time": "2021-06-25T18:19:14+00:00" + "time": "2021-07-02T18:13:18+00:00" }, { "name": "barryvdh/laravel-dompdf", @@ -2497,16 +2497,16 @@ }, { "name": "nesbot/carbon", - "version": "2.49.0", + "version": "2.50.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "93d9db91c0235c486875d22f1e08b50bdf3e6eee" + "reference": "f47f17d17602b2243414a44ad53d9f8b9ada5fdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/93d9db91c0235c486875d22f1e08b50bdf3e6eee", - "reference": "93d9db91c0235c486875d22f1e08b50bdf3e6eee", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f47f17d17602b2243414a44ad53d9f8b9ada5fdb", + "reference": "f47f17d17602b2243414a44ad53d9f8b9ada5fdb", "shasum": "" }, "require": { @@ -2558,15 +2558,15 @@ { "name": "Brian Nesbitt", "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" + "homepage": "https://markido.com" }, { "name": "kylekatarnls", - "homepage": "http://github.com/kylekatarnls" + "homepage": "https://github.com/kylekatarnls" } ], "description": "An API extension for DateTime that supports 281 different languages.", - "homepage": "http://carbon.nesbot.com", + "homepage": "https://carbon.nesbot.com", "keywords": [ "date", "datetime", @@ -2586,7 +2586,7 @@ "type": "tidelift" } ], - "time": "2021-06-02T07:31:40+00:00" + "time": "2021-06-28T22:38:45+00:00" }, { "name": "nunomaduro/collision", @@ -4161,16 +4161,16 @@ }, { "name": "symfony/console", - "version": "v4.4.25", + "version": "v4.4.26", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a62acecdf5b50e314a4f305cd01b5282126f3095" + "reference": "9aa1eb46c1b12fada74dc0c529e93d1ccef22576" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a62acecdf5b50e314a4f305cd01b5282126f3095", - "reference": "a62acecdf5b50e314a4f305cd01b5282126f3095", + "url": "https://api.github.com/repos/symfony/console/zipball/9aa1eb46c1b12fada74dc0c529e93d1ccef22576", + "reference": "9aa1eb46c1b12fada74dc0c529e93d1ccef22576", "shasum": "" }, "require": { @@ -4230,7 +4230,7 @@ "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/console/tree/v4.4.25" + "source": "https://github.com/symfony/console/tree/v4.4.26" }, "funding": [ { @@ -4246,7 +4246,7 @@ "type": "tidelift" } ], - "time": "2021-05-26T11:20:16+00:00" + "time": "2021-06-06T09:12:27+00:00" }, { "name": "symfony/css-selector", @@ -4451,16 +4451,16 @@ }, { "name": "symfony/error-handler", - "version": "v4.4.25", + "version": "v4.4.26", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "310a756cec00d29d89a08518405aded046a54a8b" + "reference": "4001f01153d0eb5496fe11d8c76d1e56b47fdb88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/310a756cec00d29d89a08518405aded046a54a8b", - "reference": "310a756cec00d29d89a08518405aded046a54a8b", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/4001f01153d0eb5496fe11d8c76d1e56b47fdb88", + "reference": "4001f01153d0eb5496fe11d8c76d1e56b47fdb88", "shasum": "" }, "require": { @@ -4500,7 +4500,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v4.4.25" + "source": "https://github.com/symfony/error-handler/tree/v4.4.26" }, "funding": [ { @@ -4516,7 +4516,7 @@ "type": "tidelift" } ], - "time": "2021-05-26T17:39:37+00:00" + "time": "2021-06-24T07:57:22+00:00" }, { "name": "symfony/event-dispatcher", @@ -4821,16 +4821,16 @@ }, { "name": "symfony/http-foundation", - "version": "v4.4.25", + "version": "v4.4.26", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "0c79d5a65ace4fe66e49702658c024a419d2438b" + "reference": "8759ed5c27c2a8a47cb60f367f4be6727f08d58b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/0c79d5a65ace4fe66e49702658c024a419d2438b", - "reference": "0c79d5a65ace4fe66e49702658c024a419d2438b", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/8759ed5c27c2a8a47cb60f367f4be6727f08d58b", + "reference": "8759ed5c27c2a8a47cb60f367f4be6727f08d58b", "shasum": "" }, "require": { @@ -4869,7 +4869,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v4.4.25" + "source": "https://github.com/symfony/http-foundation/tree/v4.4.26" }, "funding": [ { @@ -4885,20 +4885,20 @@ "type": "tidelift" } ], - "time": "2021-05-26T11:20:16+00:00" + "time": "2021-06-26T21:56:04+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.4.25", + "version": "v4.4.26", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "3795165596fe81a52296b78c9aae938d434069cc" + "reference": "e08b2fb8a6eedd81c70522e514bad9b2c1fff881" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/3795165596fe81a52296b78c9aae938d434069cc", - "reference": "3795165596fe81a52296b78c9aae938d434069cc", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/e08b2fb8a6eedd81c70522e514bad9b2c1fff881", + "reference": "e08b2fb8a6eedd81c70522e514bad9b2c1fff881", "shasum": "" }, "require": { @@ -4973,7 +4973,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v4.4.25" + "source": "https://github.com/symfony/http-kernel/tree/v4.4.26" }, "funding": [ { @@ -4989,7 +4989,7 @@ "type": "tidelift" } ], - "time": "2021-06-01T07:12:08+00:00" + "time": "2021-06-30T08:18:06+00:00" }, { "name": "symfony/mime", @@ -5724,16 +5724,16 @@ }, { "name": "symfony/process", - "version": "v4.4.25", + "version": "v4.4.26", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "cd61e6dd273975c6625316de9d141ebd197f93c9" + "reference": "7e812c84c3f2dba173d311de6e510edf701685a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/cd61e6dd273975c6625316de9d141ebd197f93c9", - "reference": "cd61e6dd273975c6625316de9d141ebd197f93c9", + "url": "https://api.github.com/repos/symfony/process/zipball/7e812c84c3f2dba173d311de6e510edf701685a8", + "reference": "7e812c84c3f2dba173d311de6e510edf701685a8", "shasum": "" }, "require": { @@ -5765,7 +5765,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v4.4.25" + "source": "https://github.com/symfony/process/tree/v4.4.26" }, "funding": [ { @@ -5781,7 +5781,7 @@ "type": "tidelift" } ], - "time": "2021-05-26T11:20:16+00:00" + "time": "2021-06-09T14:57:04+00:00" }, { "name": "symfony/routing", @@ -5952,16 +5952,16 @@ }, { "name": "symfony/translation", - "version": "v4.4.25", + "version": "v4.4.26", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "dfe132c5c6d89f90ce7f961742cc532e9ca16dd4" + "reference": "2f7fa60b8d10ca71c30dc46b0870143183a8f131" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/dfe132c5c6d89f90ce7f961742cc532e9ca16dd4", - "reference": "dfe132c5c6d89f90ce7f961742cc532e9ca16dd4", + "url": "https://api.github.com/repos/symfony/translation/zipball/2f7fa60b8d10ca71c30dc46b0870143183a8f131", + "reference": "2f7fa60b8d10ca71c30dc46b0870143183a8f131", "shasum": "" }, "require": { @@ -6020,7 +6020,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v4.4.25" + "source": "https://github.com/symfony/translation/tree/v4.4.26" }, "funding": [ { @@ -6036,7 +6036,7 @@ "type": "tidelift" } ], - "time": "2021-05-26T17:39:37+00:00" + "time": "2021-06-06T08:51:46+00:00" }, { "name": "symfony/translation-contracts", @@ -6118,16 +6118,16 @@ }, { "name": "symfony/var-dumper", - "version": "v4.4.25", + "version": "v4.4.26", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "31ea689a8e7d2410016b0d25fc15a1ba05a6e2e0" + "reference": "a586efdf2aa832d05b9249e9115d24f6a2691160" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/31ea689a8e7d2410016b0d25fc15a1ba05a6e2e0", - "reference": "31ea689a8e7d2410016b0d25fc15a1ba05a6e2e0", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/a586efdf2aa832d05b9249e9115d24f6a2691160", + "reference": "a586efdf2aa832d05b9249e9115d24f6a2691160", "shasum": "" }, "require": { @@ -6187,7 +6187,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v4.4.25" + "source": "https://github.com/symfony/var-dumper/tree/v4.4.26" }, "funding": [ { @@ -6203,7 +6203,7 @@ "type": "tidelift" } ], - "time": "2021-05-27T09:48:32+00:00" + "time": "2021-06-17T06:35:48+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -9555,16 +9555,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.3.0", + "version": "v5.3.3", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "348116319d7fb7d1faa781d26a48922428013eb2" + "reference": "19b71c8f313b411172dd5f470fd61f24466d79a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/348116319d7fb7d1faa781d26a48922428013eb2", - "reference": "348116319d7fb7d1faa781d26a48922428013eb2", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/19b71c8f313b411172dd5f470fd61f24466d79a9", + "reference": "19b71c8f313b411172dd5f470fd61f24466d79a9", "shasum": "" }, "require": { @@ -9597,7 +9597,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.3.0" + "source": "https://github.com/symfony/filesystem/tree/v5.3.3" }, "funding": [ { @@ -9613,7 +9613,7 @@ "type": "tidelift" } ], - "time": "2021-05-26T17:43:10+00:00" + "time": "2021-06-30T07:27:52+00:00" }, { "name": "theseer/tokenizer",