From ec987cbc4e606c025105add4a90e85527df6e18f Mon Sep 17 00:00:00 2001 From: Oluwaseun Olorunsola Date: Wed, 19 Apr 2023 14:06:45 +0200 Subject: [PATCH] Fix errors in 3rd party lib MAILPOET-5239 --- mailpoet/lib-3rd-party/pquery/gan_node_html.php | 4 ++-- mailpoet/lib-3rd-party/pquery/gan_selector_html.php | 2 +- mailpoet/lib-3rd-party/pquery/third_party/jsminplus.php | 2 +- mailpoet/lib/Entities/ScheduledTaskEntity.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mailpoet/lib-3rd-party/pquery/gan_node_html.php b/mailpoet/lib-3rd-party/pquery/gan_node_html.php index 9015ced6f2..5223896daf 100644 --- a/mailpoet/lib-3rd-party/pquery/gan_node_html.php +++ b/mailpoet/lib-3rd-party/pquery/gan_node_html.php @@ -1739,7 +1739,7 @@ class DomNode implements IQuery { if ($res) break 1; else break 2; default: - trigger_error('Unknown operator "'.$match['operator_value'].'" to match attributes!'); + trigger_error('Unknown operator "'.esc_html($match['operator_value']).'" to match attributes!'); return false; } } @@ -1773,7 +1773,7 @@ class DomNode implements IQuery { return false; } } else { - trigger_error('Unknown filter "'.$c['filter'].'"!'); + trigger_error('Unknown filter "'.esc_html($c['filter']).'"!'); return false; } } diff --git a/mailpoet/lib-3rd-party/pquery/gan_selector_html.php b/mailpoet/lib-3rd-party/pquery/gan_selector_html.php index f1aa9482bf..ac8935d8d6 100644 --- a/mailpoet/lib-3rd-party/pquery/gan_selector_html.php +++ b/mailpoet/lib-3rd-party/pquery/gan_selector_html.php @@ -389,7 +389,7 @@ class HtmlSelector { $error )); - trigger_error($error); + trigger_error(esc_html($error)); } /** diff --git a/mailpoet/lib-3rd-party/pquery/third_party/jsminplus.php b/mailpoet/lib-3rd-party/pquery/third_party/jsminplus.php index ace90c1bad..38b0fd18ac 100644 --- a/mailpoet/lib-3rd-party/pquery/third_party/jsminplus.php +++ b/mailpoet/lib-3rd-party/pquery/third_party/jsminplus.php @@ -217,7 +217,7 @@ class JSMinPlus } catch(Exception $e) { - echo $e->getMessage() . "\n"; + echo esc_html($e->getMessage()) . "\n"; } return false; diff --git a/mailpoet/lib/Entities/ScheduledTaskEntity.php b/mailpoet/lib/Entities/ScheduledTaskEntity.php index e4850d821b..a74f3a063c 100644 --- a/mailpoet/lib/Entities/ScheduledTaskEntity.php +++ b/mailpoet/lib/Entities/ScheduledTaskEntity.php @@ -87,7 +87,7 @@ class ScheduledTaskEntity { * @ORM\OneToMany(targetEntity="MailPoet\Entities\ScheduledTaskSubscriberEntity", mappedBy="task", fetch="EXTRA_LAZY") * @var Collection */ - public $subscribers; + private $subscribers; /** * @ORM\OneToOne(targetEntity="MailPoet\Entities\SendingQueueEntity", mappedBy="task", fetch="EAGER")