diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml
index 57131547..e93257f1 100644
--- a/.github/workflows/cypress.yml
+++ b/.github/workflows/cypress.yml
@@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- php-versions: [ '8.1', '8.2', '8.3' ]
+ php-versions: [ '8.1', '8.2', '8.3', '8.4' ]
ots: ['tfs-1.4', 'canary-3.1.2'] # TODO: add 'tfs-master' (actually doesn't work cause AAC doesn't support reading .env configuration)
name: Cypress (PHP ${{ matrix.php-versions }}, ${{ matrix.ots }})
steps:
@@ -146,6 +146,7 @@ jobs:
with:
name: cypress-screenshots-${{ matrix.php-versions }}-${{ matrix.ots }}
path: cypress/screenshots
+ if-no-files-found: ignore
- name: Upload Cypress Videos
uses: actions/upload-artifact@v4
@@ -153,6 +154,7 @@ jobs:
with:
name: cypress-videos-${{ matrix.php-versions }}-${{ matrix.ots }}
path: cypress/videos
+ if-no-files-found: ignore
- name: Upload PHP Logs
uses: actions/upload-artifact@v4
diff --git a/system/libs/pot/OTS_Guild.php b/system/libs/pot/OTS_Guild.php
index bab363a8..a7b56728 100644
--- a/system/libs/pot/OTS_Guild.php
+++ b/system/libs/pot/OTS_Guild.php
@@ -97,7 +97,7 @@ class OTS_Guild extends OTS_Row_DAO implements IteratorAggregate, Countable
*
* @param IOTS_GuildAction $invites Invites driver (don't pass it to clear driver).
*/
- public function setInvitesDriver(IOTS_GuildAction $invites = null)
+ public function setInvitesDriver(?IOTS_GuildAction $invites = null)
{
$this->invites = $invites;
}
@@ -107,7 +107,7 @@ class OTS_Guild extends OTS_Row_DAO implements IteratorAggregate, Countable
*
* @param IOTS_GuildAction $requests Membership requests driver (don't pass it to clear driver).
*/
- public function setRequestsDriver(IOTS_GuildAction $requests = null)
+ public function setRequestsDriver(?IOTS_GuildAction $requests = null)
{
$this->requests = $requests;
}
diff --git a/system/libs/pot/OTS_GuildRank.php b/system/libs/pot/OTS_GuildRank.php
index a8832faa..5e8ffb92 100644
--- a/system/libs/pot/OTS_GuildRank.php
+++ b/system/libs/pot/OTS_GuildRank.php
@@ -60,7 +60,7 @@ class OTS_GuildRank extends OTS_Row_DAO implements IteratorAggregate, Countable
* @throws PDOException On PDO operation error.
* @throws E_OTS_NotLoaded If given $guild object is not loaded.
*/
- public function find($name, OTS_Guild $guild = null)
+ public function find($name, ?OTS_Guild $guild = null)
{
$where = '';
diff --git a/system/libs/pot/OTS_Player.php b/system/libs/pot/OTS_Player.php
index 5c1cbf87..7b688d1c 100644
--- a/system/libs/pot/OTS_Player.php
+++ b/system/libs/pot/OTS_Player.php
@@ -2026,7 +2026,7 @@ class OTS_Player extends OTS_Row_DAO
* @param OTS_GuildRank|null Guild rank (null to clear assign).
* @throws E_OTS_NotLoaded If passed $guildRank parameter is not loaded.
*/
- public function setRank(OTS_GuildRank $guildRank = null)
+ public function setRank(?OTS_GuildRank $guildRank = null)
{
if(isset($guildRank))
$this->setRankId($guildRank->getId(), $guildRank->getGuild()->getId());
@@ -2632,7 +2632,7 @@ class OTS_Player extends OTS_Row_DAO
* @throws E_OTS_NotLoaded If player is not loaded.
* @throws PDOException On PDO operation error.
*/
- public function setSlot($slot, OTS_Item $item = null, $pid = 0)
+ public function setSlot($slot, ?OTS_Item $item = null, $pid = 0)
{
static $sid;
@@ -2776,7 +2776,7 @@ class OTS_Player extends OTS_Row_DAO
* @throws E_OTS_NotLoaded If player is not loaded.
* @throws PDOException On PDO operation error.
*/
- public function setDepot($depot, OTS_Item $item = null, $pid = 0, $depot_id = 0)
+ public function setDepot($depot, ?OTS_Item $item = null, $pid = 0, $depot_id = 0)
{
static $sid;
diff --git a/system/template.php b/system/template.php
index 08ff2e7d..f051e640 100644
--- a/system/template.php
+++ b/system/template.php
@@ -136,6 +136,11 @@ if($forumSetting != '')
$twig->addGlobal('template_name', $template_name);
$twig->addGlobal('template_path', $template_path);
if($twig_loader) {
+ $viewsPath = BASE . $template_path . '/views';
+ if (is_dir($viewsPath)) {
+ $twig_loader->prependPath($viewsPath);
+ }
+
$twig_loader->prependPath(BASE . $template_path);
}