Browse Source

Fix warning

Laurent Destailleur 3 years ago
parent
commit
5e0aaeb6e4
1 changed files with 3 additions and 3 deletions
  1. 3 3
      htdocs/website/samples/wrapper.php

+ 3 - 3
htdocs/website/samples/wrapper.php

@@ -226,9 +226,9 @@ if ($rss) {
 	// Find the subdirectory name as the reference
 	include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
 	$check_access = dol_check_secure_access_document($modulepart, $original_file, $entity, $refname);
-	$accessallowed              = $check_access['accessallowed'];
-	$sqlprotectagainstexternals = $check_access['sqlprotectagainstexternals'];
-	$fullpath_original_file     = $check_access['original_file']; // $fullpath_original_file is now a full path name
+	$accessallowed              = empty($check_access['accessallowed']) ? '' : $check_access['accessallowed'];
+	$sqlprotectagainstexternals = empty($check_access['sqlprotectagainstexternals']) ? '' : $check_access['sqlprotectagainstexternals'];
+	$fullpath_original_file     = empty($check_access['original_file']) ? '' : $check_access['original_file']; // $fullpath_original_file is now a full path name
 	if ($hashp) {
 		$accessallowed = 1; // When using hashp, link is public so we force $accessallowed
 		$sqlprotectagainstexternals = '';