summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-12-01 13:37:35 +0300
committerAndrew Dolgov <[email protected]>2021-12-01 13:37:35 +0300
commita201e10ee024f03fb6aad0ec1069cc4da72a9ac5 (patch)
tree1d0c5549390541694721e5d85e35f509feccc4ee /classes
parentaaebe55456b34b878b7bcccef021af7f2c8d3a75 (diff)
Revert "various fixes vor php 8.1 compatibility"
This reverts commit 14027ae04e4aee6cf1c3a4ff9a390ec266c0fb09.
Diffstat (limited to 'classes')
-rw-r--r--classes/config.php2
-rw-r--r--classes/debug.php2
-rwxr-xr-xclasses/feeditem/atom.php2
-rw-r--r--classes/feedparser.php2
-rwxr-xr-xclasses/feeds.php2
-rw-r--r--classes/pref/system.php2
6 files changed, 6 insertions, 6 deletions
diff --git a/classes/config.php b/classes/config.php
index 4c8d79ac8..95e2dd3ac 100644
--- a/classes/config.php
+++ b/classes/config.php
@@ -359,7 +359,7 @@ class Config {
if ($check == "version") {
- $rv["version"] = date("%y.%m", (int)$timestamp) . "-$commit";
+ $rv["version"] = strftime("%y.%m", (int)$timestamp) . "-$commit";
$rv["commit"] = $commit;
$rv["timestamp"] = $timestamp;
diff --git a/classes/debug.php b/classes/debug.php
index 1b9d499e5..e20126b86 100644
--- a/classes/debug.php
+++ b/classes/debug.php
@@ -88,7 +88,7 @@ class Debug {
if (!self::$enabled || self::$loglevel < $level) return false;
- $ts = date("%H:%M:%S", time());
+ $ts = strftime("%H:%M:%S", time());
if (function_exists('posix_getpid')) {
$ts = "$ts/" . posix_getpid();
}
diff --git a/classes/feeditem/atom.php b/classes/feeditem/atom.php
index cac6d8c54..36a2e91f5 100755
--- a/classes/feeditem/atom.php
+++ b/classes/feeditem/atom.php
@@ -70,7 +70,7 @@ class FeedItem_Atom extends FeedItem_Common {
*
* @return string the rewritten XML or original $content
*/
- private function rewrite_content_to_base(?string $base = null, ?string $content = '') {
+ private function rewrite_content_to_base(?string $base = null, string $content) {
if (!empty($base) && !empty($content)) {
diff --git a/classes/feedparser.php b/classes/feedparser.php
index 3821c15d8..6ce69cc89 100644
--- a/classes/feedparser.php
+++ b/classes/feedparser.php
@@ -201,7 +201,7 @@ class FeedParser {
// libxml may have invalid unicode data in error messages
function error() : string {
- return UConverter::transcode($this->error ?? '', 'UTF-8', 'UTF-8');
+ return UConverter::transcode($this->error, 'UTF-8', 'UTF-8');
}
/** @return array<string> - WARNING: may return invalid unicode data */
diff --git a/classes/feeds.php b/classes/feeds.php
index ebffe3269..a9afb70f2 100755
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -23,7 +23,7 @@ class Feeds extends Handler_Protected {
*/
private function _format_headlines_list($feed, string $method, string $view_mode, int $limit, bool $cat_view,
int $offset, string $override_order, bool $include_children, ?int $check_first_id = null,
- ?bool $skip_first_id_check = false, ? string $order_by = ''): array {
+ bool $skip_first_id_check, string $order_by): array {
$disable_cache = false;
diff --git a/classes/pref/system.php b/classes/pref/system.php
index 806291c72..10f196b55 100644
--- a/classes/pref/system.php
+++ b/classes/pref/system.php
@@ -138,7 +138,7 @@ class Pref_System extends Handler_Administrative {
$sth->execute($errno_values);
while ($line = $sth->fetch()) {
- foreach ($line as $k => $v) { $line[$k] = htmlspecialchars($v ?? ''); }
+ foreach ($line as $k => $v) { $line[$k] = htmlspecialchars($v); }
?>
<tr>
<td class='errno'>