From aab7aa3caaaf311a88ef0775d2c1a82e3346ffa2 Mon Sep 17 00:00:00 2001 From: Jacob G Date: Sun, 26 Apr 2015 10:39:16 -0400 Subject: [PATCH] fixed regex after API format changed --- ConfirmAccount/business/AccountRequestSubmission.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ConfirmAccount/business/AccountRequestSubmission.php b/ConfirmAccount/business/AccountRequestSubmission.php index eac6eb1..e0452cd 100644 --- a/ConfirmAccount/business/AccountRequestSubmission.php +++ b/ConfirmAccount/business/AccountRequestSubmission.php @@ -112,8 +112,11 @@ class AccountRequestSubmission { return; } $success = false; - preg_match_all('%
.*?.*?
(.*?)
%ms', $data, $matches); - foreach ($matches[2] as $key => $val) { + preg_match_all('%
.*?
.*?\s+
(.*?)
%ms', $data, $matches); + unset($matches[2]); + unset($matches[3]); + unset($matches[4]); + foreach ($matches[5] as $key => $val) { $user = $matches[1][$key]; $comment = trim($val); if (strtolower($user) == strtolower(htmlspecialchars($this->userName)) && $this->stringContainsArray($comment, $codes)) {