-
-
Save mrvdb/0b49dd3c580bcfbe1358 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/actions/newnotice.php b/actions/newnotice.php | |
index 8143850..3dab96d 100644 | |
--- a/actions/newnotice.php | |
+++ b/actions/newnotice.php | |
@@ -69,7 +69,7 @@ class NewnoticeAction extends FormAction | |
protected function doPreparation() | |
{ | |
foreach(array('inreplyto') as $opt) { | |
- if (!empty($this->trimmed($opt))) { | |
+ if ($this->trimmed($opt)) { | |
$this->formOpts[$opt] = $this->trimmed($opt); | |
} | |
} | |
diff --git a/extlib/Mf2/Parser.php b/extlib/Mf2/Parser.php | |
index 04d44e2..8bf44be 100644 | |
--- a/extlib/Mf2/Parser.php | |
+++ b/extlib/Mf2/Parser.php | |
@@ -123,7 +123,7 @@ function unicodeTrim($str) { | |
* @return string|array The prefixed name of the first microfomats class found or false | |
*/ | |
function mfNamesFromClass($class, $prefix='h-') { | |
- $class = str_replace([' ', ' ', "\n"], ' ', $class); | |
+ $class = str_replace(array(' ', ' ', "\n"), ' ', $class); | |
$classes = explode(' ', $class); | |
$matches = array(); | |
@@ -149,7 +149,7 @@ function nestedMfPropertyNamesFromClass($class) { | |
$prefixes = array('p-', 'u-', 'dt-', 'e-'); | |
$propertyNames = array(); | |
- $class = str_replace([' ', ' ', "\n"], ' ', $class); | |
+ $class = str_replace(array(' ', ' ', "\n"), ' ', $class); | |
foreach (explode(' ', $class) as $classname) { | |
foreach ($prefixes as $prefix) { | |
if (strpos($classname, $prefix) === 0 and $classname !== $prefix) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment