Skip to content

Instantly share code, notes, and snippets.

@mrvdb

mrvdb/gs.diff Secret

Created Jul 15, 2014
Embed
What would you like to do?
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
You can’t perform that action at this time.