diff options
| author | lsces <lester@lsces.co.uk> | 2026-03-26 17:37:00 +0000 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2026-03-26 17:37:00 +0000 |
| commit | d5623525391b6f74ef8297f4fadeeccc58702590 (patch) | |
| tree | bea17a2b773e0a10d4f28b2e7f184b009bf3d243 /includes | |
| parent | 9feb175cd2af3081358abb49c352c6ae1539bda3 (diff) | |
| download | liberty-d5623525391b6f74ef8297f4fadeeccc58702590.tar.gz liberty-d5623525391b6f74ef8297f4fadeeccc58702590.tar.bz2 liberty-d5623525391b6f74ef8297f4fadeeccc58702590.zip | |
Empty value corrections
Diffstat (limited to 'includes')
| -rwxr-xr-x | includes/classes/LibertyContent.php | 4 | ||||
| -rwxr-xr-x | includes/content_history_inc.php | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/includes/classes/LibertyContent.php b/includes/classes/LibertyContent.php index 5a547d7..1424e61 100755 --- a/includes/classes/LibertyContent.php +++ b/includes/classes/LibertyContent.php @@ -1943,7 +1943,7 @@ class LibertyContent extends LibertyBase implements BitCacheable { * @return string Descriptive title for the page */ public static function getTitleFromHash( &$pHash, $pDefault=true ) { - $ret = null; + $ret = ''; if( !empty( $pHash['title'] ) ) { $ret = $pHash['title']; } elseif( $pDefault && !empty( $pHash['content_name'] ) ) { @@ -2286,7 +2286,7 @@ class LibertyContent extends LibertyBase implements BitCacheable { } - public function getThumbnailUri( $pSize='small' ) { + public function getThumbnailUri( string $pSize='small' ) { if( $this->isValid() ) { return $this->getThumbnailUriFromHash( $this->mInfo, $pSize ); } diff --git a/includes/content_history_inc.php b/includes/content_history_inc.php index e7d833e..fbc2caa 100755 --- a/includes/content_history_inc.php +++ b/includes/content_history_inc.php @@ -29,7 +29,7 @@ if( isset( $_REQUEST["delete"] ) && isset( $_REQUEST["hist"] )) { $gBitSmarty->assign( 'sourcev', nl2br( htmlentities( $version["data"][0]["data"] ))); } -} elseif( BitBase::verifyId( $_REQUEST["preview"] )) { +} elseif( isset( $_REQUEST["preview"] ) && BitBase::verifyId( $_REQUEST["preview"] )) { if( $version = $gContent->getHistory( $_REQUEST["preview"] )) { $version['data'][0]['no_cache'] = true; $version['data'][0]['parsed_data'] = LibertyContent::parseDataHash( $version["data"][0], $gContent ); @@ -37,7 +37,7 @@ if( isset( $_REQUEST["delete"] ) && isset( $_REQUEST["hist"] )) { $gBitSmarty->assign( 'version', $_REQUEST["preview"] ); } -} elseif( BitBase::verifyId( $_REQUEST["diff2"] ) ) { +} elseif( isset( $_REQUEST["diff2"] ) && BitBase::verifyId( $_REQUEST["diff2"] ) ) { $from_version = $_REQUEST["diff2"]; $from_page = $gContent->getHistory( $from_version ); $from_lines = explode( "\n",$from_page["data"][0]["data"] ); @@ -68,7 +68,7 @@ if( isset( $_REQUEST["delete"] ) && isset( $_REQUEST["hist"] )) { $gBitSmarty->assign( 'version_from', $from_version ); $gBitSmarty->assign( 'version_to', $to_version ); -} elseif( BitBase::verifyId( $_REQUEST["compare"] )) { +} elseif ( isset( $_REQUEST["compare"] ) && BitBase::verifyId( $_REQUEST["compare"] )) { $from_version = $_REQUEST["compare"]; $from_page = $gContent->getHistory( $from_version ); $from_page['data'][0]['no_cache'] = true; @@ -77,7 +77,7 @@ if( isset( $_REQUEST["delete"] ) && isset( $_REQUEST["hist"] )) { $gBitSmarty->assign( 'diff_to', $gContent->getParsedData() ); $gBitSmarty->assign( 'version_from', $from_version ); -} elseif( BitBase::verifyId( $_REQUEST["rollback"] )) { +} elseif ( isset( $_REQUEST["rollback"] ) && BitBase::verifyId( $_REQUEST["rollback"] )) { $gContent->verifyUserPermission( !empty( $rollbackPerm ) ? $rollbackPerm : $gContent->mUpdateContentPerm ); if( !isset( $_REQUEST["rollback_comment"] )) { $_REQUEST["rollback_comment"] = ''; |
