From 05d8bf6b5460964b4ed1c7637a9d5599827e0519 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 25 Feb 2019 07:11:35 -0500 Subject: [PATCH 1/2] Fix wrong use of array_shift in Core\Worker --- src/Core/Worker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Worker.php b/src/Core/Worker.php index 0a97c11c13..7b661d863f 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -850,7 +850,7 @@ class Worker } if (!empty($waiting)) { - $priority = array_shift(array_keys($waiting)); + $priority = array_keys($waiting)[0]; Logger::info('No underassigned priority found, now taking the highest priority.', ['priority' => $priority]); return $priority; } From 97eb2ba0538cdba1c878a0dd9d2379dfefa38637 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 25 Feb 2019 07:12:01 -0500 Subject: [PATCH 2/2] Fix possibly undefined after index in Text\BBCode --- src/Content/Text/BBCode.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index e9b5f98d0b..ddfacf1603 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -67,6 +67,7 @@ class BBCode extends BaseObject $post["after"] = trim(substr($body, $pos + strlen($data[0]))); } else { $post["text"] = trim(str_replace($data[0], "", $body)); + $post["after"] = ''; } $attacheddata = $data[2];