diff --git a/update/common/scripts/5.4/cleanuntranslatablerelations.php b/update/common/scripts/5.4/cleanuntranslatablerelations.php
index <HASH>..<HASH> 100644
--- a/update/common/scripts/5.4/cleanuntranslatablerelations.php
+++ b/update/common/scripts/5.4/cleanuntranslatablerelations.php
@@ -53,7 +53,8 @@ if ( $optDryRun ) {
  */
 function parseRelationListIds( $relationListXml )
 {
-    if ( empty( trim( $relationListXml ) ) )
+    $relationListXml = trim( $relationListXml );
+    if ( empty( $relationListXml ) )
         return array();
 
     $xml = simplexml_load_string( $relationListXml );
Fix EZP-<I>: fix additional check