diff --git a/.vscode/extensions.json b/.vscode/extensions.json index f0119e4a..bf08864f 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,7 +1,7 @@ { "recommendations": [ "bmewburn.vscode-intelephense-client", - "felixfbecker.php-debug", + "xdebug.php-debug", "shevaua.phpcs" ] } diff --git a/app/controller/files.php b/app/controller/files.php index 60b8bc64..8b8fe1cb 100644 --- a/app/controller/files.php +++ b/app/controller/files.php @@ -142,11 +142,20 @@ public function thumb($f3, $params) $c1 = imagecolorallocate($frame, 243, 243, 243); imagefilledrectangle($frame, $ox - $fb, $oy - $fb, $size - $ox + $fb, $size - $oy + $fb, $c1); $c2 = imagecolorallocate($frame, 230, 230, 230); - imagefilledpolygon($frame, array( - $size - $ox + $fb, $oy - $fb, - $size - $ox + $fb, $size - $oy + $fb, - $ox - $fb, $size - $oy + $fb, - ), 3, $c2); + // This is an incredibly stupid way of deprecating a parameter, thanks PHP. + if (PHP_VERSION_ID >= 80000) { + imagefilledpolygon($frame, array( + $size - $ox + $fb, $oy - $fb, + $size - $ox + $fb, $size - $oy + $fb, + $ox - $fb, $size - $oy + $fb, + ), $c2); + } else { + imagefilledpolygon($frame, array( + $size - $ox + $fb, $oy - $fb, + $size - $ox + $fb, $size - $oy + $fb, + $ox - $fb, $size - $oy + $fb, + ), 3, $c2); + } } // Copy thumbnail onto frame diff --git a/app/helper/view.php b/app/helper/view.php index 074bfebe..520b421a 100644 --- a/app/helper/view.php +++ b/app/helper/view.php @@ -22,6 +22,9 @@ public function __construct() */ public function parseText($str, $options = array(), $ttl = null) { + if ($str === null || $str === '') { + return ''; + } if ($options === null) { $options = array(); } @@ -238,6 +241,7 @@ protected function _parseEmoticons($str) */ protected function _parseTextile($str, $escape = true) { + error_reporting(E_ALL ^ E_DEPRECATED); // Temporarily ignore deprecations because this lib is incompatible $tex = new \Netcarver\Textile\Parser('html5'); $tex->setDimensionlessImages(true); $tex->setRestricted($escape); @@ -286,7 +290,7 @@ public function gravatar($email, $size = 80) $f3 = \Base::instance(); $rating = $f3->get("gravatar.rating") ? $f3->get("gravatar.rating") : "pg"; $default = $f3->get("gravatar.default") ? $f3->get("gravatar.default") : "mm"; - return "//gravatar.com/avatar/" . md5(strtolower($email)) . + return "https://gravatar.com/avatar/" . md5(strtolower($email ?? '')) . "?s=" . intval($size) . "&d=" . urlencode($default) . "&r=" . urlencode($rating); diff --git a/app/model/issue.php b/app/model/issue.php index 1c0027a2..b6e6d5fe 100644 --- a/app/model/issue.php +++ b/app/model/issue.php @@ -10,20 +10,20 @@ * @property int $type_id * @property string $name * @property string $description - * @property int $parent_id + * @property ?int $parent_id * @property int $author_id - * @property int $owner_id + * @property ?int $owner_id * @property int $priority - * @property float $hours_total - * @property float $hours_remaining - * @property float $hours_spent + * @property ?float $hours_total + * @property ?float $hours_remaining + * @property ?float $hours_spent * @property string $created_date - * @property string $closed_date - * @property string $deleted_date - * @property string $start_date - * @property string $due_date - * @property string $repeat_cycle - * @property int $sprint_id + * @property ?string $closed_date + * @property ?string $deleted_date + * @property ?string $start_date + * @property ?string $due_date + * @property ?string $repeat_cycle + * @property ?int $sprint_id */ class Issue extends \Model { @@ -302,7 +302,7 @@ protected function _saveUpdate(bool $notify = true): Issue\Update $importantChanges = 0; $importantFields = array('status', 'name', 'description', 'owner_id', 'priority', 'due_date'); foreach ($this->fields as $key => $field) { - if ($field["changed"] && rtrim($field["value"]) != rtrim($this->_getPrev($key))) { + if ($field["changed"] && rtrim($field["value"] ?? '') != rtrim($this->_getPrev($key) ?? '')) { $updateField = new \Model\Issue\Update\Field(); $updateField->issue_update_id = $update->id; $updateField->field = $key; @@ -537,7 +537,11 @@ public function hashState(): array { $result = $this->cast(); foreach ($result as &$value) { - $value = md5($value); + if ($value === null) { + $value = md5(''); + } else { + $value = md5($value); + } } return $result; } diff --git a/app/view/admin/config.html b/app/view/admin/config.html index 97521ac1..7794f7b6 100644 --- a/app/view/admin/config.html +++ b/app/view/admin/config.html @@ -176,7 +176,7 @@
- +
diff --git a/app/view/blocks/dashboard-issue-list.html b/app/view/blocks/dashboard-issue-list.html index 73155368..c7e1e656 100644 --- a/app/view/blocks/dashboard-issue-list.html +++ b/app/view/blocks/dashboard-issue-list.html @@ -18,7 +18,7 @@

- +

Due {{ date("l, F j", strtotime(@item.due_date)) }}

diff --git a/app/view/blocks/issue-list/issue.html b/app/view/blocks/issue-list/issue.html index 8f523831..9546892b 100644 --- a/app/view/blocks/issue-list/issue.html +++ b/app/view/blocks/issue-list/issue.html @@ -25,7 +25,7 @@ {{ !empty(@item.sprint_start_date) ? date("n/j/y", strtotime(@item.sprint_start_date)) : "" }} - {{ ucwords(@@dict[@item.repeat_cycle]) ?: @dict.not_repeating }} + {{ isset(@dict[@item.repeat_cycle]) ? ucwords(@dict[@item.repeat_cycle]) : @dict.not_repeating }} {{ date("n/j/y", @this->utc2local(@item.created_date)) }} {{ !empty(@item.due_date) ? date("n/j/y", strtotime(@item.due_date)) : "" }} diff --git a/app/view/install.html b/app/view/install.html index 075853bc..b6b2ce3c 100644 --- a/app/view/install.html +++ b/app/view/install.html @@ -86,7 +86,7 @@

Site Configuration

- +
@@ -42,8 +42,8 @@ {{ @item.dependency_type }} {{ @item.author_name | esc }} {{ @item.owner_name | esc }} - {{ date("n/j/y", strtotime(@item.start_date)) }} - {{ !empty(@item.due_date) ? date("n/j", strtotime(@item.due_date)) : "" }} + {{ @item.start_date ? date("n/j/y", strtotime(@item.start_date)) : '' }} + {{ !empty(@item.due_date) ? date("n/j", strtotime(@item.due_date)) : "" }} {{ @item.status_name }} @@ -56,7 +56,7 @@
- +
@@ -97,8 +97,8 @@ {{ @item.dependency_type }} {{ @item.author_name | esc }} {{ @item.owner_name | esc }} - {{ date("n/j/y", strtotime(@item.start_date)) }} - {{ !empty(@item.due_date) ? date("n/j", strtotime(@item.due_date)) : "" }} + {{ @item.start_date ? date("n/j/y", strtotime(@item.start_date)) : '' }} + {{ !empty(@item.due_date) ? date("n/j", strtotime(@item.due_date)) : "" }} {{ @item.status_name }} diff --git a/app/view/issues/single/related.html b/app/view/issues/single/related.html index cc017690..980583b5 100644 --- a/app/view/issues/single/related.html +++ b/app/view/issues/single/related.html @@ -32,7 +32,7 @@ {{ @item.owner_name | esc }} {{ date("n/j/y", strtotime(@item.created_date)) }} {{ @item.priority_name | esc }} - {{ !empty(@item.due_date) ? date("n/j", strtotime(@item.due_date)) : "" }} + {{ !empty(@item.due_date) ? date("n/j", strtotime(@item.due_date)) : "" }} {{ @item.status_name | esc }} diff --git a/app/view/user/single.html b/app/view/user/single.html index 251e8f95..0d36a995 100644 --- a/app/view/user/single.html +++ b/app/view/user/single.html @@ -42,7 +42,9 @@

  • {{ @dict.created_issues }} {{ @created_issues.total }}
  • {{ @dict.assigned_issues }} {{ @assigned_issues.total }}
  • {{ @dict.overdue_issues }} {{ @overdue_issues.total }}
  • -
  • {{ @dict.issue_tree }}
  • + +
  • {{ @dict.issue_tree }}
  • +
    @@ -53,13 +55,15 @@

    -
    -

    {{ @dict.loading }}

    -
    + +
    +

    {{ @dict.loading }}

    +
    +

    diff --git a/composer.lock b/composer.lock index daa4f410..9787654e 100644 --- a/composer.lock +++ b/composer.lock @@ -191,7 +191,7 @@ }, { "name": "symfony/polyfill-iconv", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", @@ -254,7 +254,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.25.0" }, "funding": [ { @@ -274,7 +274,7 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", @@ -335,7 +335,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0" }, "funding": [ { @@ -355,7 +355,7 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -419,7 +419,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" }, "funding": [ { @@ -439,7 +439,7 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -502,7 +502,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" }, "funding": [ { @@ -522,7 +522,7 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", @@ -578,7 +578,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.25.0" }, "funding": [ { @@ -598,16 +598,16 @@ }, { "name": "voku/anti-xss", - "version": "4.1.37", + "version": "4.1.39", "source": { "type": "git", "url": "https://github.com/voku/anti-xss.git", - "reference": "728e158427a263917f33b0a29eb75d866bd18d17" + "reference": "64a59ba4744e6722866ff3440d93561da9e85cd0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/anti-xss/zipball/728e158427a263917f33b0a29eb75d866bd18d17", - "reference": "728e158427a263917f33b0a29eb75d866bd18d17", + "url": "https://api.github.com/repos/voku/anti-xss/zipball/64a59ba4744e6722866ff3440d93561da9e85cd0", + "reference": "64a59ba4744e6722866ff3440d93561da9e85cd0", "shasum": "" }, "require": { @@ -653,7 +653,7 @@ ], "support": { "issues": "https://github.com/voku/anti-xss/issues", - "source": "https://github.com/voku/anti-xss/tree/4.1.37" + "source": "https://github.com/voku/anti-xss/tree/4.1.39" }, "funding": [ { @@ -677,20 +677,20 @@ "type": "tidelift" } ], - "time": "2022-02-15T01:57:51+00:00" + "time": "2022-03-08T17:03:58+00:00" }, { "name": "voku/portable-ascii", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/voku/portable-ascii.git", - "reference": "9bd89e83cecdf8c37b64909454249eaed98b2c89" + "reference": "b56450eed252f6801410d810c8e1727224ae0743" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/portable-ascii/zipball/9bd89e83cecdf8c37b64909454249eaed98b2c89", - "reference": "9bd89e83cecdf8c37b64909454249eaed98b2c89", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/b56450eed252f6801410d810c8e1727224ae0743", + "reference": "b56450eed252f6801410d810c8e1727224ae0743", "shasum": "" }, "require": { @@ -727,7 +727,7 @@ ], "support": { "issues": "https://github.com/voku/portable-ascii/issues", - "source": "https://github.com/voku/portable-ascii/tree/2.0.0" + "source": "https://github.com/voku/portable-ascii/tree/2.0.1" }, "funding": [ { @@ -751,20 +751,20 @@ "type": "tidelift" } ], - "time": "2022-01-24T18:59:03+00:00" + "time": "2022-03-08T17:03:00+00:00" }, { "name": "voku/portable-utf8", - "version": "6.0.3", + "version": "6.0.4", "source": { "type": "git", "url": "https://github.com/voku/portable-utf8.git", - "reference": "82a714b5a4973974c1113e97b11c1044a8b8cb85" + "reference": "f6c78e492520115bb2d947c3a0d90a2c6b7a60a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/portable-utf8/zipball/82a714b5a4973974c1113e97b11c1044a8b8cb85", - "reference": "82a714b5a4973974c1113e97b11c1044a8b8cb85", + "url": "https://api.github.com/repos/voku/portable-utf8/zipball/f6c78e492520115bb2d947c3a0d90a2c6b7a60a8", + "reference": "f6c78e492520115bb2d947c3a0d90a2c6b7a60a8", "shasum": "" }, "require": { @@ -826,7 +826,7 @@ ], "support": { "issues": "https://github.com/voku/portable-utf8/issues", - "source": "https://github.com/voku/portable-utf8/tree/6.0.3" + "source": "https://github.com/voku/portable-utf8/tree/6.0.4" }, "funding": [ { @@ -850,7 +850,7 @@ "type": "tidelift" } ], - "time": "2022-01-30T05:20:24+00:00" + "time": "2022-03-08T17:04:59+00:00" } ], "packages-dev": [