summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2026-03-26 17:37:00 +0000
committerlsces <lester@lsces.co.uk>2026-03-26 17:37:00 +0000
commitd5623525391b6f74ef8297f4fadeeccc58702590 (patch)
treebea17a2b773e0a10d4f28b2e7f184b009bf3d243 /includes
parent9feb175cd2af3081358abb49c352c6ae1539bda3 (diff)
downloadliberty-d5623525391b6f74ef8297f4fadeeccc58702590.tar.gz
liberty-d5623525391b6f74ef8297f4fadeeccc58702590.tar.bz2
liberty-d5623525391b6f74ef8297f4fadeeccc58702590.zip
Empty value corrections
Diffstat (limited to 'includes')
-rwxr-xr-xincludes/classes/LibertyContent.php4
-rwxr-xr-xincludes/content_history_inc.php8
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"] = '';