From 26ad4f7d981c6d2201430dae145e938a57587f6c Mon Sep 17 00:00:00 2001 From: Christophe HENRY Date: Fri, 2 Apr 2021 21:29:46 +0200 Subject: [PATCH] Adds strict_types=1 --- index.php | 2 +- lib-htmgem.inc.php | 6 +++--- lib-html.inc.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 166193c..230fa0c 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,4 @@ - "^^^"); } elseif ("#" == $line1) { preg_match("/^(#{1,3})\s*(.+)?/", $line, $matches); - yield array("mode" => $matches[1], "title" => trim(@$matches[2])); + yield array("mode" => $matches[1], "title" => trim($matches[2]??"")); } elseif ("=>" == $line2) { preg_match("/^=>\s*([^\s]+)(?:\s+(.*))?$/", $line, $matches); - yield array("mode" => "=>", "link" => trim(@$matches[1]), "text" => trim(@$matches[2])); + yield array("mode" => "=>", "link" => trim($matches[1]??""), "text" => trim($matches[2]??"")); } elseif ("```" == $line3) { preg_match("/^```\s*(.*)$/", $line, $matches); $current = array("mode" => "```", "alt" => trim($matches[1]), "texts" => array()); diff --git a/lib-html.inc.php b/lib-html.inc.php index 6069a6f..ec04522 100644 --- a/lib-html.inc.php +++ b/lib-html.inc.php @@ -1,4 +1,4 @@ -