diff options
| author | spiderr <spiderr@bitweaver.org> | 2020-11-11 23:12:23 -0500 |
|---|---|---|
| committer | spiderr <spiderr@bitweaver.org> | 2020-11-11 23:12:23 -0500 |
| commit | a8eda5c8f5e0696f391b9da7bd10f89d98b92cdc (patch) | |
| tree | 629411209c70f8cb38a677eda4440d2024cfdedb | |
| parent | 27d535cd07ec80f5ac6236cc3d7c030b8d6998c2 (diff) | |
| download | boards-a8eda5c8f5e0696f391b9da7bd10f89d98b92cdc.tar.gz boards-a8eda5c8f5e0696f391b9da7bd10f89d98b92cdc.tar.bz2 boards-a8eda5c8f5e0696f391b9da7bd10f89d98b92cdc.zip | |
force BitBoard constructor ID's to int
| -rw-r--r-- | BitBoard.php | 6 | ||||
| -rw-r--r-- | 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'; |
