Skip to content

Commit c72d3a7

Browse files
committed
Don't write basedir settings if it doesn't exist
Signed-off-by: Oscar Rydhé <[email protected]>
1 parent db627e0 commit c72d3a7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

repair_settings.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,8 @@ function set_settings()
10791079
if ($context['smfVersion'] == '2.1')
10801080
{
10811081
$setString[] = array('attachmentUploadDir', json_encode($attach_dirs));
1082-
$setString[] = array('attachment_basedirectories', json_encode($attach_base_dirs));
1082+
if (!empty($attach_base_dirs))
1083+
$setString[] = array('attachment_basedirectories', json_encode($attach_base_dirs));
10831084
}
10841085
// Only one dir...or maybe nothing at all
10851086
elseif (count($attach_dirs) > 1)

0 commit comments

Comments
 (0)