Skip to content

Commit

Permalink
Trial fix for bug #986
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Nov 10, 2019
1 parent 42abfe6 commit 3590352
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion public_html/admin/install/classes/installer.class.php
Expand Up @@ -4255,6 +4255,7 @@ private function migrateStep4()
* Check for other missing files
* e.g. images/articles, images/topics, images/userphotos
*/
clearstatcache();
$missing_images = false;

// Article images
Expand All @@ -4277,11 +4278,12 @@ private function migrateStep4()
$missing_topic_images = false;
$result = DB_query("SELECT `imageurl` FROM {$_TABLES['topics']}");
$num_topic_images = DB_numRows($result);
$pathTopicBase = rtrim($html_path, '/\\');

for ($i = 0; $i < $num_topic_images; $i++) {
$topic_image = DB_fetchArray($result, false);

if (!file_exists($html_path . $topic_image['imageurl'])) { // If topic image does not exist
if (!file_exists($pathTopicBase . $topic_image['imageurl'])) { // If topic image does not exist
// Log the error
COM_errorLog($LANG_MIGRATE[26] . $LANG_MIGRATE[29] . $topic_image['imageurl'] . $LANG_MIGRATE[30] . $_TABLES['topics'] . $LANG_MIGRATE[31] . $html_path . 'images/topics/');
$missing_topic_images = true;
Expand Down

0 comments on commit 3590352

Please sign in to comment.