aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-02-13 18:58:12 +0000
committerMario <mario@mariovavti.com>2022-02-13 18:58:12 +0000
commita7ec1805e3f5836641503d1f8cb6ccc1d8c885fa (patch)
tree048628b0da961a7cfda32dce7ed3572875e22907 /include/text.php
parent4b06bc552f04fc78545a450343cc59e236791a66 (diff)
downloadvolse-hubzilla-a7ec1805e3f5836641503d1f8cb6ccc1d8c885fa.tar.gz
volse-hubzilla-a7ec1805e3f5836641503d1f8cb6ccc1d8c885fa.tar.bz2
volse-hubzilla-a7ec1805e3f5836641503d1f8cb6ccc1d8c885fa.zip
address deprecation warnings
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php
index 29a2ab3b1..f69801302 100644
--- a/include/text.php
+++ b/include/text.php
@@ -108,7 +108,10 @@ function notags($string) {
* @return string
*/
function escape_tags($string) {
- return(htmlspecialchars($string, ENT_COMPAT, 'UTF-8', false));
+ if (!$string) {
+ return EMPTY_STR;
+ }
+ return (htmlspecialchars($string, ENT_COMPAT, 'UTF-8', false));
}
@@ -3531,7 +3534,7 @@ function text_highlight($s, $lang) {
// echo (($xml->asXML('data.xml')) ? 'Your XML file has been generated successfully!' : 'Error generating XML file!');
function arrtoxml($root_elem,$arr) {
- $xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><' . $root_elem . '></' . $root_elem . '>', null, false);
+ $xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><' . $root_elem . '></' . $root_elem . '>', 0, false);
array2XML($xml,$arr);
return $xml->asXML();