summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2025-02-22 20:03:37 +0100
committerSlávek Banko <slavek.banko@axis.cz>2025-02-22 20:03:37 +0100
commitde7d5ed1732ff265a1e7bb79b9e520706d4c6927 (patch)
tree2bafb382f6578dd2f2558f9b162a6eefc8580b3b
parent534fbd936700b7148b74bd0e9688cbab5fda5a18 (diff)
downloadwebsite-core-de7d5ed1732ff265a1e7bb79b9e520706d4c6927.tar.gz
website-core-de7d5ed1732ff265a1e7bb79b9e520706d4c6927.zip
Fix compatibility with PHP 8.x.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--news.php2
-rw-r--r--newsentry.php2
-rw-r--r--rss.php2
3 files changed, 3 insertions, 3 deletions
diff --git a/news.php b/news.php
index e55cff2..85cfe8f 100644
--- a/news.php
+++ b/news.php
@@ -21,7 +21,7 @@ if ($handle = opendir('./news/')) {
foreach($filenames as $file) {
// sort($handle, SORT_NUMERIC);
- if (($file != ".") && ($file != "..") && ($file{0} != '.')) {
+ if (($file != ".") && ($file != "..") && ($file[0] != '.')) {
echo "<h3>$file: ";
$data = file_get_contents("news/$file"); //read the file
diff --git a/newsentry.php b/newsentry.php
index 12835a3..33f091c 100644
--- a/newsentry.php
+++ b/newsentry.php
@@ -12,7 +12,7 @@
function writeNewsEntry($file, $prefix) {
// sort($handle, SORT_NUMERIC);
- if (($file != ".") && ($file != "..") && ($file{0} != '.')) {
+ if (($file != ".") && ($file != "..") && ($file[0] != '.')) {
echo '<div class="news">';
echo "<h3>$file: ";
diff --git a/rss.php b/rss.php
index 535b6e1..ba014d7 100644
--- a/rss.php
+++ b/rss.php
@@ -14,7 +14,7 @@ function processDir($dirname, $phpfile) {
foreach($filenames as $file) {
// sort($handle, SORT_NUMERIC);
- if (($file != ".") && ($file != "..") && ($file{0} != '.')) {
+ if (($file != ".") && ($file != "..") && ($file[0] != '.')) {
echo " <item>\n";
$datestring = $file;
$datestring = str_replace(".", "-", $datestring);