From 3c4324a7328871ccf2dd0ea9e81804047f715767 Mon Sep 17 00:00:00 2001 From: Tapan Kumar Thapa Date: Tue, 10 Oct 2017 13:46:12 +0530 Subject: [PATCH 1/2] Twitter execute script from bug fix --- src/Pass/TwitterTransformPass.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Pass/TwitterTransformPass.php b/src/Pass/TwitterTransformPass.php index e586bdcd..3ecef56e 100644 --- a/src/Pass/TwitterTransformPass.php +++ b/src/Pass/TwitterTransformPass.php @@ -142,7 +142,8 @@ protected function getTweetId(DOMQuery $el) $matches = []; if (preg_match('&(*UTF8)twitter.com/.*/status(?:es)?/([^/]+)&i', $href, $matches)) { if (!empty($matches[1])) { - $tweet_id = $matches[1]; + //$tweet_id = $matches[1]; + $tweet_id = strtok($matches[1], "?"); break; } } From b9f8b0bbcab6af2b50391ab1f3bd1e8d77bd1653 Mon Sep 17 00:00:00 2001 From: Tapan Kumar Thapa Date: Tue, 10 Oct 2017 21:04:22 +0530 Subject: [PATCH 2/2] Twitter bug fix --- src/Pass/TwitterTransformPass.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Pass/TwitterTransformPass.php b/src/Pass/TwitterTransformPass.php index 3ecef56e..7e88ba9a 100644 --- a/src/Pass/TwitterTransformPass.php +++ b/src/Pass/TwitterTransformPass.php @@ -142,8 +142,7 @@ protected function getTweetId(DOMQuery $el) $matches = []; if (preg_match('&(*UTF8)twitter.com/.*/status(?:es)?/([^/]+)&i', $href, $matches)) { if (!empty($matches[1])) { - //$tweet_id = $matches[1]; - $tweet_id = strtok($matches[1], "?"); + $tweet_id = strtok($matches[1], "?"); break; } }