From ae9f0705c4510f9ffc327077b414c3403247e993 Mon Sep 17 00:00:00 2001 From: Brian DiChiara Date: Tue, 19 Dec 2023 17:15:58 -0600 Subject: [PATCH] Fix a PHP bug. --- client-mu-plugins/goodbids/blocks/bid-now/block.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client-mu-plugins/goodbids/blocks/bid-now/block.php b/client-mu-plugins/goodbids/blocks/bid-now/block.php index a68c47e3e..f2aefb27b 100644 --- a/client-mu-plugins/goodbids/blocks/bid-now/block.php +++ b/client-mu-plugins/goodbids/blocks/bid-now/block.php @@ -42,9 +42,12 @@ class BidNow { * @param array $block */ public function __construct( array $block ) { - $this->block = $block; - $this->auction_id = goodbids()->auctions->get_auction_id(); - $this->bid_product_id = goodbids()->auctions->get_bid_product_id( $this->auction_id ); + $this->block = $block; + $this->auction_id = goodbids()->auctions->get_auction_id(); + + if ( $this->auction_id ) { + $this->bid_product_id = goodbids()->auctions->get_bid_product_id( $this->auction_id ); + } } /**