From a8eda5c8f5e0696f391b9da7bd10f89d98b92cdc Mon Sep 17 00:00:00 2001 From: spiderr Date: Wed, 11 Nov 2020 23:12:23 -0500 Subject: force BitBoard constructor ID's to int --- BitBoard.php | 6 +++--- BitBoardTopic.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BitBoard.php b/BitBoard.php index 584c08c..50c5ec0 100644 --- a/BitBoard.php +++ b/BitBoard.php @@ -36,8 +36,8 @@ class BitBoard extends LibertyMime { **/ function __construct( $pBitBoardId=NULL, $pContentId=NULL ) { parent::__construct(); - $this->mBitBoardId = $pBitBoardId; - $this->mContentId = $pContentId; + $this->mBitBoardId = (int)$pBitBoardId; + $this->mContentId = (int)$pContentId; $this->mContentTypeGuid = BITBOARD_CONTENT_TYPE_GUID; $this->registerContentType( BITBOARD_CONTENT_TYPE_GUID, array( 'content_type_guid' => BITBOARD_CONTENT_TYPE_GUID, @@ -67,7 +67,7 @@ class BitBoard extends LibertyMime { $lookupColumn = $this->verifyId( $this->mBitBoardId ) ? 'board_id' : 'content_id'; $bindVars = array(); $selectSql = $joinSql = $whereSql = ''; - array_push( $bindVars, $lookupId = @BitBase::verifyId( $this->mBitBoardId ) ? $this->mBitBoardId : $this->mContentId ); + array_push( $bindVars, (int)($lookupId = @BitBase::verifyId( $this->mBitBoardId ) ? $this->mBitBoardId : $this->mContentId) ); $this->getServicesSql( 'content_load_sql_function', $selectSql, $joinSql, $whereSql, $bindVars ); $query = "SELECT s.*, lc.*, " . diff --git a/BitBoardTopic.php b/BitBoardTopic.php index de511ca..cae8ac4 100644 --- a/BitBoardTopic.php +++ b/BitBoardTopic.php @@ -44,7 +44,7 @@ class BitBoardTopic extends LibertyMime { **/ function __construct( $pRootId=NULL ) { parent::__construct(); - $this->mRootId = $pRootId; + $this->mRootId = (int)$pRootId; // Permission setup $this->mViewContentPerm = 'p_boards_read'; -- cgit v1.3