Skip to content

Commit

Permalink
Fix missing global namespace indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
akirk committed Jan 15, 2022
1 parent 9bfb197 commit e7d9404
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/Mf2/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function fetch($url, $convertClassic = true, &$curlInfo=null) {
* @return string
*/
function unicodeToHtmlEntities($input) {
return mb_convert_encoding($input, 'HTML-ENTITIES', mb_detect_encoding($input));
return \mb_convert_encoding($input, 'HTML-ENTITIES', \mb_detect_encoding($input));
}

/**
Expand All @@ -116,7 +116,7 @@ function collapseWhitespace($str) {

function unicodeTrim($str) {
// this is cheating. TODO: find a better way if this causes any problems
$str = str_replace(mb_convert_encoding(' ', 'UTF-8', 'HTML-ENTITIES'), ' ', $str);
$str = str_replace(\mb_convert_encoding(' ', 'UTF-8', 'HTML-ENTITIES'), ' ', $str);
$str = preg_replace('/^\s+/', '', $str);
return preg_replace('/\s+$/', '', $str);
}
Expand Down Expand Up @@ -165,8 +165,8 @@ function nestedMfPropertyNamesFromClass($class) {
foreach (explode(' ', $class) as $classname) {
foreach ($prefixes as $prefix) {
// Check if $classname is a valid property classname for $prefix.
if (mb_substr($classname, 0, mb_strlen($prefix)) == $prefix && $classname != $prefix) {
$propertyName = mb_substr($classname, mb_strlen($prefix));
if (\mb_substr($classname, 0, \mb_strlen($prefix)) == $prefix && $classname != $prefix) {
$propertyName = \mb_substr($classname, \mb_strlen($prefix));
$propertyNames[$propertyName][] = $prefix;
}
}
Expand Down

0 comments on commit e7d9404

Please sign in to comment.