[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/07: Compatibilty PHP8.1 deprecated explode
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 01/07: Compatibilty PHP8.1 deprecated explode with NULL |
Date: |
Sat, 3 Sep 2022 17:16:03 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit f0c744c36f090b70cebbb8e2473e39b2b779bade
Author: Dany De Bontridder <dany@alchimerys.be>
AuthorDate: Sat Sep 3 18:45:12 2022 +0200
Compatibilty PHP8.1 deprecated explode with NULL
---
include/lib/ac_common.php | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/lib/ac_common.php b/include/lib/ac_common.php
index cbb5a9a51..16ffa8949 100644
--- a/include/lib/ac_common.php
+++ b/include/lib/ac_common.php
@@ -1610,4 +1610,15 @@ function noalyss_strip_tags($p_string)
{
if ($p_string===null) return "";
return strip_tags($p_string);
+}
+
+/**
+ * to avoid deprecated in PHP8.1 : explode cannot use a null
+ * @param $separator
+ * @param $string
+ * @return array | empty string
+ */
+function noalyss_explode($separator,$string) {
+ if ($string===null) return '';
+ return explode($separator,$string);
}
\ No newline at end of file
- [Noalyss-commit] [noalyss] branch master updated (407e05671 -> 9d5fc4180), Dany De Bontridder, 2022/09/03
- [Noalyss-commit] [noalyss] 03/07: Fix code : invalid CSS removed, Dany De Bontridder, 2022/09/03
- [Noalyss-commit] [noalyss] 06/07: New : 0002190: Journaux : option pour supprimer la quantité, Dany De Bontridder, 2022/09/03
- [Noalyss-commit] [noalyss] 02/07: Fix cosmetic bug : css_size will be used if it is null,, Dany De Bontridder, 2022/09/03
- [Noalyss-commit] [noalyss] 04/07: Optional attribute for using quantity, Dany De Bontridder, 2022/09/03
- [Noalyss-commit] [noalyss] 07/07: Merge branch 'devel', Dany De Bontridder, 2022/09/03
- [Noalyss-commit] [noalyss] 05/07: New : 0002190: Journaux : option pour supprimer la quantité, Dany De Bontridder, 2022/09/03
- [Noalyss-commit] [noalyss] 01/07: Compatibilty PHP8.1 deprecated explode with NULL,
Dany De Bontridder <=