Skip to content

Commit

Permalink
Fix App Export on PHP 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienheraud committed Mar 1, 2023
1 parent 4d41e37 commit f8fe270
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions administrator/components/com_cck/models/folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,11 @@ public function prepareExport( $id = 0, $elements = array(), $dependencies = arr
}
}

if ( count( $data['elements']['tables'] ) ) {
if ( is_array( $data['elements']['tables'] ) && count( $data['elements']['tables'] ) ) {
CCK_Export::exportTables( $data );
}

if ( count( $data['elements']['processings'] ) ) {
if ( is_array( $data['elements']['processings'] ) && count( $data['elements']['processings'] ) ) {
$isCck = true;

CCK_Export::exportProcessings( $data, $extensions );
Expand Down
4 changes: 3 additions & 1 deletion libraries/cck/base/install/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,9 @@ public static function exportContent( $elemtype, &$elem, &$data, &$extensions, $
// Prepare
$xml2 = $xml->addChild( $elemtype );
foreach ( $elem as $k=>$v ) {
$xml2->addChild( $k, htmlspecialchars( $v ) );
if ( is_string( $v ) ) {
$xml2->addChild( $k, htmlspecialchars( $v ) );
}
}

// Force
Expand Down

0 comments on commit f8fe270

Please sign in to comment.