vichan-devel / vichan

Vichan is the most popular and widely used imageboard software in the world. It is a free, light-weight, fast, highly configurable and user-friendly imageboard software package.
https://vichan.info
Other
633 stars 198 forks source link

Cannot move a thread containing deleted images. #234

Closed seisatsu closed 7 years ago

seisatsu commented 7 years ago

Try deleting images from a post in a thread. If you try to move the thread you will get the error "Undefined index: thumb". Deleting the post with the deleted images solves the problem.

ghost commented 7 years ago

Can confirm. added the error debug information. Might be able to fix it but no guarantees.

Array
(
    [file] => C:\xampp\htdocs\hokachan\inc\mod\pages.php:1317
    [errno] => 8
    [error] => Undefined index: thumb
    [backtrace] => Array
        (
            [0] => Array
                (
                    [file] => C:\xampp\htdocs\hokachan\inc\functions.php
                    [line] => 339
                    [function] => error
                    [args] => Array
                        (
                            [0] => Undefined index: thumb
                            [1] => 1
                            [2] => Array
                                (
                                    [file] => C:\xampp\htdocs\hokachan\inc\mod\pages.php:1317
                                    [errno] => 8
                                    [error] => Undefined index: thumb
                                    [backtrace] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [file] => C:\xampp\htdocs\hokachan\mod.php
                                                    [line] => 177
                                                    [function] => mod_move
                                                    [args] => Array
                                                        (
                                                            [0] => a
                                                            [1] => 2
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [1] => Array
                (
                    [file] => C:\xampp\htdocs\hokachan\inc\mod\pages.php
                    [line] => 1317
                    [function] => verbose_error_handler
                    [args] => Array
                        (
                            [0] => 8
                            [1] => Undefined index: thumb
                            [2] => C:\xampp\htdocs\hokachan\inc\mod\pages.php
                            [3] => 1317
                            [4] => Array
                                (
                                    [originBoard] => a
                                    [postID] => 2
                                    [board] => Array
                                        (
                                            [uri] => a
                                            [title] => a
                                            [subtitle] => a
                                            [name] => a
                                            [dir] => a/
                                            [url] => /a/
                                        )

                                    [config] => Array
                                        (
                                            [db] => Array
                                                (
                                                    [type] => mysql
                                                    [server] => localhost
                                                    [user] => root
                                                    [password] => 
                                                    [database] => hokachan
                                                    [prefix] => 
                                                    [persistent] => 
                                                    [dsn] => 
                                                    [timeout] => 30
                                                )

                                            [api] => Array
                                                (
                                                    [enabled] => 1
                                                )

                                            [cache] => Array
                                                (
                                                    [enabled] => php
                                                    [timeout] => 172800
                                                    [prefix] => 
                                                    [memcached] => Array
                                                        (
                                                            [0] => Array
                                                                (
                                                                    [0] => localhost
                                                                    [1] => 11211
                                                                )

                                                        )

                                                    [redis] => Array
                                                        (
                                                            [0] => localhost
                                                            [1] => 6379
                                                            [2] => 
                                                            [3] => 1
                                                        )

                                                )

                                            [cookies] => Array
                                                (
                                                    [mod] => mod
                                                    [js] => serv
                                                    [jail] => 1
                                                    [expire] => 15552000
                                                    [salt] => MGJhZDg2NWEwMmQ4MmY0OTcwNjg3Zm
                                                    [httponly] => 1
                                                    [path] => /hokachan/
                                                )

                                            [error] => Array
                                                (
                                                    [flood] => Flood detected; Post discarded.
                                                    [bot] => You look like a bot.
                                                    [referer] => Your browser sent an invalid or no HTTP referer.
                                                    [toolong] => The %s field was too long.
                                                    [toolong_body] => The body was too long.
                                                    [tooshort_body] => The body was too short or empty.
                                                    [noimage] => You must upload an image.
                                                    [toomanyimages] => You have attempted to upload too many images!
                                                    [nomove] => The server failed to handle your upload.
                                                    [fileext] => Unsupported image format.
                                                    [noboard] => Invalid board!
                                                    [nonexistant] => Thread specified does not exist.
                                                    [locked] => Thread locked. You may not reply at this time.
                                                    [reply_hard_limit] => Thread has reached its maximum reply limit.
                                                    [image_hard_limit] => Thread has reached its maximum image limit.
                                                    [nopost] => You didn't make a post.
                                                    [spam] => Your request looks automated; Post discarded.
                                                    [unoriginal] => Unoriginal content!
                                                    [muted] => Unoriginal content! You have been muted for %d seconds.
                                                    [youaremuted] => You are muted! Expires in %d seconds.
                                                    [dnsbl] => Your IP address is listed in %s.
                                                    [toomanylinks] => Too many links; flood detected.
                                                    [toomanycites] => Too many cites; post discarded.
                                                    [toomanycross] => Too many cross-board links; post discarded.
                                                    [nodelete] => You didn't select anything to delete.
                                                    [noreport] => You didn't select anything to report.
                                                    [toomanyreports] => You can't report that many posts at once.
                                                    [invalidpassword] => Wrong password…
                                                    [invalidimg] => Invalid image.
                                                    [unknownext] => Unknown file extension.
                                                    [filesize] => Maximum file size: %maxsz% bytes<br>Your file's size: %filesz% bytes
                                                    [maxsize] => The file was too big.
                                                    [genwebmerror] => There was a problem processing your webm.
                                                    [webmerror] => There was a problem processing your webm.
                                                    [invalidwebm] => Invalid webm uploaded.
                                                    [webmhasaudio] => The uploaded webm contains an audio or another type of additional stream.
                                                    [webmtoolong] => The uploaded webm is longer than 120 seconds.
                                                    [fileexists] => That file <a href="%s">already exists</a>!
                                                    [fileexistsinthread] => That file <a href="%s">already exists</a> in this thread!
                                                    [delete_too_soon] => You'll have to wait another %s before deleting that.
                                                    [mime_exploit] => MIME type detection XSS exploit (IE) detected; post discarded.
                                                    [invalid_embed] => Couldn't make sense of the URL of the video you tried to embed.
                                                    [captcha] => You seem to have mistyped the verification.
                                                    [toomanyunban] => You are only allowed to unban %s users at a time. You tried to unban %u users.
                                                    [invalid] => Invalid username and/or password.
                                                    [notamod] => You are not a mod…
                                                    [invalidafter] => Invalid username and/or password. Your user may have been deleted or changed.
                                                    [malformed] => Invalid/malformed cookies.
                                                    [missedafield] => Your browser didn't submit an input when it should have.
                                                    [required] => The %s field is required.
                                                    [invalidfield] => The %s field was invalid.
                                                    [boardexists] => There is already a %s board.
                                                    [noaccess] => You don't have permission to do that.
                                                    [invalidpost] => That post doesn't exist…
                                                    [404] => Page not found.
                                                    [modexists] => That mod <a href="?/users/%d">already exists</a>!
                                                    [invalidtheme] => That theme doesn't exist!
                                                    [csrf] => Invalid security token! Please go back and try again.
                                                    [badsyntax] => Your code contained PHP syntax errors. Please go back and correct them. PHP says: 
                                                )

                                            [dir] => Array
                                                (
                                                    [img] => src/
                                                    [thumb] => thumb/
                                                    [res] => res/
                                                    [template] => C:\xampp\htdocs\hokachan/templates
                                                    [themes] => C:\xampp\htdocs\hokachan/templates/themes
                                                    [themes_uri] => templates/themes
                                                    [home] => 
                                                    [static] => /hokachan/static/
                                                )

                                            [mod] => Array
                                                (
                                                    [unban_limit] => 
                                                    [lock_ip] => 1
                                                    [default] => /
                                                    [link_delete] => [D]
                                                    [link_ban] => [B]
                                                    [link_bandelete] => [B&amp;D]
                                                    [link_deletefile] => [F]
                                                    [link_spoilerimage] => [S]
                                                    [link_deletebyip] => [D+]
                                                    [link_deletebyip_global] => [D++]
                                                    [link_sticky] => [Sticky]
                                                    [link_desticky] => [-Sticky]
                                                    [link_lock] => [Lock]
                                                    [link_unlock] => [-Lock]
                                                    [link_bumplock] => [Sage]
                                                    [link_bumpunlock] => [-Sage]
                                                    [link_editpost] => [Edit]
                                                    [link_move] => [Move]
                                                    [link_cycle] => [Cycle]
                                                    [link_uncycle] => [-Cycle]
                                                    [dns_lookup] => 1
                                                    [ip_recentposts] => 5
                                                    [recent_reports] => 10
                                                    [modlog_page] => 350
                                                    [banlist_page] => 350
                                                    [news_page] => 40
                                                    [search_page] => 200
                                                    [noticeboard_page] => 50
                                                    [noticeboard_dashboard] => 5
                                                    [check_ban_message] => 
                                                    [default_ban_message] => USER WAS BANNED FOR THIS POST
                                                    [ban_message] => <span class="public_ban">(%s)</span>
                                                    [shadow_mesage] => Moved to %s.
                                                    [shadow_capcode] => Mod
                                                    [shadow_name] => 
                                                    [rebuild_timelimit] => 0
                                                    [snippet_length] => 75
                                                    [raw_html_default] => 
                                                    [dismiss_reports_on_lock] => 1
                                                    [config_editor_php] => 
                                                    [groups] => Array
                                                        (
                                                            [10] => Janitor
                                                            [20] => Mod
                                                            [30] => Admin
                                                            [99] => Disabled
                                                        )

                                                    [capcode] => Array
                                                        (
                                                            [20] => Array
                                                                (
                                                                    [0] => Mod
                                                                )

                                                            [30] => 1
                                                        )

                                                    [skip_per_board] => 
                                                    [show_ip] => 20
                                                    [delete] => 10
                                                    [ban] => 20
                                                    [bandelete] => 20
                                                    [unban] => 20
                                                    [spoilerimage] => 10
                                                    [deletefile] => 10
                                                    [deletebyip] => 20
                                                    [deletebyip_global] => 30
                                                    [sticky] => 20
                                                    [cycle] => 20
                                                    [lock] => 20
                                                    [postinlocked] => 20
                                                    [bumplock] => 20
                                                    [view_bumplock] => 20
                                                    [editpost] => 30
                                                    [move] => 30
                                                    [bypass_field_disable] => 20
                                                    [postunoriginal] => 30
                                                    [bypass_filters] => 30
                                                    [flood] => 30
                                                    [rawhtml] => 30
                                                    [reports] => 10
                                                    [report_dismiss] => 10
                                                    [report_dismiss_ip] => 10
                                                    [view_banlist] => 20
                                                    [view_banstaff] => 20
                                                    [view_banquestionmark] => 
                                                    [view_banexpired] => 1
                                                    [view_ban] => 20
                                                    [view_notes] => 10
                                                    [create_notes] => 10
                                                    [remove_notes] => 30
                                                    [newboard] => 30
                                                    [manageboards] => 30
                                                    [deleteboard] => 30
                                                    [manageusers] => 20
                                                    [promoteusers] => 30
                                                    [editusers] => 30
                                                    [change_password] => 10
                                                    [deleteusers] => 30
                                                    [createusers] => 30
                                                    [modlog] => 30
                                                    [show_ip_modlog] => 30
                                                    [modlog_ip] => 20
                                                    [create_pm] => 10
                                                    [master_pm] => 30
                                                    [rebuild] => 30
                                                    [search] => 10
                                                    [search_posts] => 10
                                                    [noticeboard] => 10
                                                    [noticeboard_post] => 20
                                                    [noticeboard_delete] => 30
                                                    [public_ban] => 20
                                                    [themes] => 30
                                                    [news] => 30
                                                    [news_custom] => 30
                                                    [news_delete] => 30
                                                    [edit_config] => 30
                                                    [view_ban_appeals] => 20
                                                    [ban_appeals] => 20
                                                    [recent] => 20
                                                    [edit_pages] => 20
                                                    [config] => Array
                                                        (
                                                            [99] => Array
                                                                (
                                                                    [0] => mod>config
                                                                    [1] => mod>config_editor_php
                                                                    [2] => mod>groups
                                                                    [3] => convert_args
                                                                    [4] => db>password
                                                                )

                                                            [10] => Array
                                                                (
                                                                    [0] => !
                                                                )

                                                            [20] => Array
                                                                (
                                                                    [0] => !
                                                                    [1] => global_message
                                                                )

                                                        )

                                                )

                                            [spam] => Array
                                                (
                                                    [hidden_inputs_min] => 4
                                                    [hidden_inputs_max] => 12
                                                    [hidden_inputs_max_pass] => 12
                                                    [hidden_inputs_expire] => 10800
                                                    [unicode] => 1
                                                    [hidden_input_names] => Array
                                                        (
                                                            [0] => user
                                                            [1] => username
                                                            [2] => login
                                                            [3] => search
                                                            [4] => q
                                                            [5] => url
                                                            [6] => firstname
                                                            [7] => lastname
                                                            [8] => text
                                                            [9] => message
                                                        )

                                                    [valid_inputs] => Array
                                                        (
                                                            [0] => hash
                                                            [1] => board
                                                            [2] => thread
                                                            [3] => mod
                                                            [4] => name
                                                            [5] => email
                                                            [6] => subject
                                                            [7] => post
                                                            [8] => body
                                                            [9] => password
                                                            [10] => sticky
                                                            [11] => lock
                                                            [12] => raw
                                                            [13] => embed
                                                            [14] => captcha_cookie
                                                            [15] => captcha_text
                                                            [16] => spoiler
                                                            [17] => page
                                                            [18] => file_url
                                                            [19] => json_response
                                                            [20] => user_flag
                                                            [21] => no_country
                                                            [22] => tag
                                                        )

                                                )

                                            [filters] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [condition] => Array
                                                                (
                                                                    [flood-match] => Array
                                                                        (
                                                                            [0] => ip
                                                                        )

                                                                    [flood-time] => 5
                                                                )

                                                            [action] => reject
                                                            [message] => Flood detected; Post discarded.
                                                        )

                                                    [1] => Array
                                                        (
                                                            [condition] => Array
                                                                (
                                                                    [flood-match] => Array
                                                                        (
                                                                            [0] => ip
                                                                            [1] => body
                                                                        )

                                                                    [flood-time] => 5
                                                                    [!body] => /^$/
                                                                )

                                                            [action] => reject
                                                            [message] => Flood detected; Post discarded.
                                                        )

                                                    [2] => Array
                                                        (
                                                            [condition] => Array
                                                                (
                                                                    [flood-match] => Array
                                                                        (
                                                                            [0] => body
                                                                        )

                                                                    [flood-time] => 5
                                                                )

                                                            [action] => reject
                                                            [message] => Flood detected; Post discarded.
                                                        )

                                                )

                                            [wordfilters] => Array
                                                (
                                                )

                                            [custom_capcode] => Array
                                                (
                                                )

                                            [custom_tripcode] => Array
                                                (
                                                )

                                            [dnsbl] => Array
                                                (
                                                )

                                            [dnsbl_exceptions] => Array
                                                (
                                                    [0] => 127.0.0.1
                                                )

                                            [remote] => Array
                                                (
                                                )

                                            [allowed_ext] => Array
                                                (
                                                    [0] => jpg
                                                    [1] => jpeg
                                                    [2] => bmp
                                                    [3] => gif
                                                    [4] => png
                                                )

                                            [allowed_ext_files] => Array
                                                (
                                                    [0] => txt
                                                    [1] => zip
                                                    [2] => webm
                                                    [3] => mp4
                                                )

                                            [file_icons] => Array
                                                (
                                                    [default] => file.png
                                                    [zip] => zip.png
                                                    [webm] => video.png
                                                    [mp4] => video.png
                                                )

                                            [footer] => Array
                                                (
                                                    [0] => All trademarks, copyrights, comments, and images on this page are owned by and are the responsibility of their respective parties.
                                                )

                                            [stylesheets] => Array
                                                (
                                                    [SH4D1L4Y] => shadilay.css
                                                    [Yotsuba B] => 
                                                    [Yotsuba] => yotsuba.css
                                                    [Burichan] => burichan.css
                                                    [Dark Roach] => dark_roach.css
                                                    [Favela] => favela.css
                                                    [Luna] => luna.css
                                                    [Miku] => miku.css
                                                    [Northboard] => northboard_cb.css
                                                    [Photon] => photon.css
                                                    [Ricechan] => ricechan.css
                                                    [Roach] => roach.css
                                                    [Rugby] => rugby.css
                                                    [Stripes] => stripes.css
                                                    [V8CH] => v8ch.css
                                                )

                                            [additional_javascript] => Array
                                                (
                                                    [0] => js/jquery.min.js
                                                    [1] => js/jquery-ui.custom.min.js
                                                    [2] => js/ajax.js
                                                    [3] => js/captcha.js
                                                    [4] => js/download-original.js
                                                    [5] => js/expand-too-long.js
                                                    [6] => js/expand-video.js
                                                    [7] => js/expand.js
                                                    [8] => js/file-selector.js
                                                    [9] => js/gallery-view.js
                                                    [10] => js/hide-images.js
                                                    [11] => js/hide-threads.js
                                                    [12] => js/inline-expanding.js
                                                    [13] => js/options.js
                                                    [14] => js/options/general.js
                                                    [15] => js/post-hover.js
                                                    [16] => js/quick-post-controls.js
                                                    [17] => js/show-backlinks.js
                                                    [18] => js/show-op.js
                                                    [19] => js/show-own-posts.js
                                                    [20] => js/thread-stats.js
                                                    [21] => js/toggle-images.js
                                                    [22] => js/toggle-locked-threads.js
                                                    [23] => js/treeview.js
                                                    [24] => js/thread-watcher.js
                                                    [25] => js/comment-toolbar.js
                                                    [26] => js/settings.js
                                                    [27] => js/quick-reply.js
                                                    [28] => js/quote-selection.js
                                                    [29] => js/ajax-post-controls.js
                                                    [30] => js/options/user-css.js
                                                    [31] => js/options/user-js.js
                                                    [32] => js/webm-settings.js
                                                    [33] => js/image-hover.js
                                                    [34] => js/inline.js
                                                    [35] => js/titlebar-notifications.js
                                                    [36] => js/mobile-style.js
                                                    [37] => js/wPaint/8ch.js
                                                    [38] => js/wpaint.js
                                                    [39] => js/expand-all-images.js
                                                    [40] => js/infinite-scroll.js
                                                    [41] => js/youtube.js
                                                    [42] => js/jquery.lazyload.js
                                                )

                                            [markup] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [0] => /'''(.+?)'''/
                                                            [1] => <strong>$1</strong>
                                                        )

                                                    [1] => Array
                                                        (
                                                            [0] => /''(.+?)''/
                                                            [1] => <em>$1</em>
                                                        )

                                                    [2] => Array
                                                        (
                                                            [0] => /\*\*(.+?)\*\*/
                                                            [1] => <span class="spoiler">$1</span>
                                                        )

                                                    [3] => Array
                                                        (
                                                            [0] => /^[ |]*==(.+?)==[ |]*$/m
                                                            [1] => <span class="heading">$1</span>
                                                        )

                                                )

                                            [custom_pages] => Array
                                                (
                                                )

                                            [dashboard_links] => Array
                                                (
                                                )

                                            [locale] => en
                                            [blotter] => 
                                            [global_message] => 
                                            [check_updates] => 1
                                            [check_updates_time] => 43200
                                            [debug] => 1
                                            [verbose_errors] => 1
                                            [debug_explain] => 
                                            [tmp] => C:\Users\vesan\AppData\Local\Temp
                                            [redirect_http] => 303
                                            [has_installed] => .installed
                                            [syslog] => 
                                            [dns_system] => 
                                            [fcrdns] => 1
                                            [shell_path] => /usr/local/bin
                                            [secure_trip_salt] => ODBlMDJmZDNmYjk1ODQyNDI4ZWE2OT
                                            [captcha] => Array
                                                (
                                                    [enabled] => 1
                                                    [expires_in] => 120
                                                    [length] => 3
                                                    [provider_get] => http://localhost/hokachan/captcha/entrypoint.php
                                                    [provider_check] => http://localhost/hokachan/captcha/entrypoint.php
                                                    [extra] => abcdefghijklmnopqrstuvwxyz
                                                )

                                            [new_thread_capt] => 
                                            [board_locked] => 
                                            [proxy_check] => 
                                            [proxy_save] => 
                                            [flood_time] => 5
                                            [flood_time_ip] => 5
                                            [flood_time_same] => 5
                                            [force_body] => 
                                            [force_body_op] => 1
                                            [force_image_op] => 
                                            [strip_superfluous_returns] => 1
                                            [strip_combining_chars] => 1
                                            [max_body] => 180000
                                            [body_truncate] => 15
                                            [body_truncate_char] => 2500
                                            [max_links] => 20
                                            [max_cites] => 45
                                            [max_cross] => 45
                                            [track_cites] => 1
                                            [max_filename_len] => 255
                                            [max_filename_display] => 30
                                            [allow_delete] => 1
                                            [delete_time] => 10
                                            [reply_limit] => 250
                                            [image_hard_limit] => 0
                                            [reply_hard_limit] => 0
                                            [robot_enable] => 
                                            [robot_strip_repeating] => 1
                                            [robot_mute] => 1
                                            [robot_mute_hour] => 336
                                            [robot_mute_multiplier] => 2
                                            [robot_mute_descritpion] => You have been muted for unoriginal content.
                                            [auto_unicode] => 1
                                            [markup_urls] => 1
                                            [link_prefix] => 
                                            [url_ads] => 
                                            [allow_upload_by_url] => 1
                                            [upload_by_url_timeout] => 15
                                            [early_404] => 
                                            [early_404_page] => 3
                                            [early_404_replies] => 5
                                            [early_404_staged] => 
                                            [always_noko] => 
                                            [spoiler_images] => 1
                                            [field_disable_name] => 
                                            [field_disable_email] => 
                                            [field_disable_subject] => 
                                            [field_disable_reply_subject] => 
                                            [field_disable_password] => 
                                            [field_email_selectbox] => 
                                            [hide_sage] => 
                                            [hide_email] => 
                                            [country_flags] => 
                                            [allow_no_country] => 
                                            [country_flags_condensed] => 1
                                            [country_flags_condensed_css] => static/flags/flags.css
                                            [user_flag] => 
                                            [user_flags] => Array
                                                (
                                                )

                                            [allow_roll] => 
                                            [oekaki] => 1
                                            [require_ban_view] => 1
                                            [ban_show_post] => 1
                                            [ban_page_extra] => 
                                            [ban_appeals] => 1
                                            [ban_appeals_min_length] => 21600
                                            [ban_appeals_max] => 1
                                            [show_modname] => 1
                                            [markup_code] => 
                                            [markup_repair_tidy] => 
                                            [always_regenerate_markup] => 
                                            [max_images] => 3
                                            [multiimage_method] => split
                                            [thumb_width] => 200
                                            [thumb_height] => 200
                                            [thumb_op_width] => 200
                                            [thumb_op_height] => 200
                                            [thumb_ext] => png
                                            [thumb_keep_animation_frames] => 1
                                            [thumb_method] => gd
                                            [convert_args] => -size %dx%d %s -thumbnail %dx%d -auto-orient +profile "*" %s
                                            [strip_exif] => 
                                            [use_exiftool] => 
                                            [redraw_image] => 
                                            [convert_auto_orient] => 
                                            [convert_manual_orient] => 
                                            [ie_mime_type_detection] => /<(?:body|head|html|img|plaintext|pre|script|table|title|a href|channel|scriptlet)/i
                                            [allowed_ext_op] => 
                                            [file_thumb] => static/%s
                                            [spoiler_image] => static/spoiler.png
                                            [image_deleted] => static/deleted.png
                                            [minimum_copy_resize] => 
                                            [max_filesize] => 10485760
                                            [max_width] => 10000
                                            [max_height] => 10000
                                            [image_reject_repost] => 1
                                            [image_reject_repost_in_thread] => 
                                            [show_ratio] => 
                                            [show_filename] => 1
                                            [webm] => Array
                                                (
                                                    [use_ffmpeg] => 
                                                    [allow_audio] => 1
                                                    [max_length] => 120
                                                    [ffmpeg_path] => ffmpeg
                                                    [ffprobe_path] => ffprobe
                                                )

                                            [image_identification] => 1
                                            [image_identification_imgops] => 1
                                            [image_identification_exif] => 1
                                            [image_identification_google] => 1
                                            [image_identification_iqdb] => 
                                            [bsd_md5] => 
                                            [gnu_md5] => 
                                            [noko50_count] => 50
                                            [noko50_min] => 100
                                            [threads_per_page] => 20
                                            [max_pages] => 100
                                            [threads_preview] => 3
                                            [threads_preview_sticky] => 1
                                            [board_abbreviation] => /%s/
                                            [anonymous] => Anonymous
                                            [report_limit] => 3
                                            [allow_subtitle_html] => 1
                                            [timezone] => America/Los_Angeles
                                            [post_date] => %m/%d/%y (%a) %H:%M:%S
                                            [ban_date] => %A %e %B, %Y
                                            [button_newtopic] => New Topic
                                            [button_reply] => New Reply
                                            [poster_ids] => 
                                            [poster_id_length] => 5
                                            [thread_subject_in_title] => 
                                            [genpassword_chars] => abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+
                                            [default_stylesheet] => Array
                                                (
                                                    [0] => SH4D1L4Y
                                                    [1] => shadilay.css
                                                )

                                            [stylesheets_board] => 
                                            [font_awesome] => 1
                                            [font_awesome_css] => stylesheets/font-awesome/css/font-awesome.min.css
                                            [boards] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [Home] => /
                                                        )

                                                    [1] => Array
                                                        (
                                                            [0] => b
                                                        )

                                                    [2] => Array
                                                        (
                                                            [Omnis] => /omnis/index.html
                                                        )

                                                    [3] => Array
                                                        (
                                                            [Search] => /search.php
                                                        )

                                                    [4] => Array
                                                        (
                                                            [Mod] => /mod.php
                                                        )

                                                )

                                            [boardlist_wrap_bracket] => 
                                            [page_nav_top] => 1
                                            [minify_html] => 1
                                            [display_flags] => 1
                                            [flag_style] => width:16px;height:11px;
                                            [additional_javascript_compile] => 1
                                            [minify_js] => 
                                            [enable_embedding] => 1
                                            [embedding] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [0] => /^https?:\/\/(\w+\.)?youtube\.com\/watch\?v=([a-zA-Z0-9\-_]{10,11})(&.+)?$/i
                                                            [1] => <iframe style="float: left;margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%" frameborder="0" id="ytplayer" src="https://www.youtube.com/embed/$2"></iframe>
                                                        )

                                                    [1] => Array
                                                        (
                                                            [0] => /^https?:\/\/(\w+\.)?vimeo\.com\/(\d{2,10})(\?.+)?$/i
                                                            [1] => <object style="float: left;margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="https://vimeo.com/moogaloop.swf?clip_id=$2&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" /><embed src="https://vimeo.com/moogaloop.swf?clip_id=$2&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="%%tb_width%%" height="%%tb_height%%"></object>
                                                        )

                                                    [2] => Array
                                                        (
                                                            [0] => /^https?:\/\/(\w+\.)?dailymotion\.com\/video\/([a-zA-Z0-9]{2,10})(_.+)?$/i
                                                            [1] => <object style="float: left;margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%"><param name="movie" value="http://www.dailymotion.com/swf/video/$2"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><param name="wmode" value="transparent"><embed type="application/x-shockwave-flash" src="http://www.dailymotion.com/swf/video/$2" width="%%tb_width%%" height="%%tb_height%%" wmode="transparent" allowfullscreen="true" allowscriptaccess="always"></object>
                                                        )

                                                    [3] => Array
                                                        (
                                                            [0] => /^https?:\/\/(\w+\.)?metacafe\.com\/watch\/(\d+)\/([a-zA-Z0-9_\-.]+)\/(\?[^'"<>]+)?$/i
                                                            [1] => <div style="float:left;margin:10px 20px;width:%%tb_width%%px;height:%%tb_height%%px"><embed flashVars="playerVars=showStats=no|autoPlay=no" src="https://www.metacafe.com/fplayer/$2/$3.swf" width="%%tb_width%%" height="%%tb_height%%" wmode="transparent" allowFullScreen="true" allowScriptAccess="always" name="Metacafe_$2" pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></div>
                                                        )

                                                    [4] => Array
                                                        (
                                                            [0] => /^https?:\/\/video\.google\.com\/videoplay\?docid=(\d+)([&#](.+)?)?$/i
                                                            [1] => <embed src="https://video.google.com/googleplayer.swf?docid=$1&hl=en&fs=true" style="width:%%tb_width%%px;height:%%tb_height%%px;float:left;margin:10px 20px" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash"></embed>
                                                        )

                                                    [5] => Array
                                                        (
                                                            [0] => /^https?:\/\/(\w+\.)?vocaroo\.com\/i\/([a-zA-Z0-9]{2,15})$/i
                                                            [1] => <object style="float: left;margin: 10px 20px;" width="148" height="44"><param name="movie" value="https://vocaroo.com/player.swf?playMediaID=$2&autoplay=0"><param name="wmode" value="transparent"><embed src="https://vocaroo.com/player.swf?playMediaID=$2&autoplay=0" width="148" height="44" wmode="transparent" type="application/x-shockwave-flash"></object>
                                                        )

                                                )

                                            [embed_width] => 300
                                            [embed_height] => 250
                                            [root] => /hokachan/
                                            [domain] => http://localhost
                                            [root_file] => 
                                            [file_index] => index.html
                                            [file_page] => %d.html
                                            [file_page50] => %d+50.html
                                            [file_mod] => mod.php
                                            [file_post] => post.php
                                            [file_script] => main.js
                                            [board_path] => %s/
                                            [url_favicon] => /static/favicon.ico
                                            [try_smarter] => 1
                                            [enable_antibot] => 
                                            [capcode] =>  <span class="capcode">## %s</span>
                                            [move_replies] => 1
                                            [purge_bans] => 43200
                                            [cycle_limit] => 250
                                            [pages_max] => 10
                                            [user_moderation] => 
                                            [file_board] => 
                                            [allowed_tags] => 
                                            [search] => Array
                                                (
                                                    [enable] => 1
                                                    [queries_per_minutes] => Array
                                                        (
                                                            [0] => 15
                                                            [1] => 2
                                                        )

                                                    [queries_per_minutes_all] => Array
                                                        (
                                                            [0] => 50
                                                            [1] => 2
                                                        )

                                                    [search_limit] => 1000
                                                )

                                            [board_search] => 1
                                            [public_logs] => 0
                                            [purge_timeout] => 3
                                            [gzip_static] => 
                                            [board_regex] => [0-9a-zA-Z$_\x{0080}-\x{FFFF}]{1,58}
                                            [youtube_js_html] => <div class="video-container" data-video="$2"><a href="https://youtu.be/$2" target="_blank" class="file"><img style="width:360px;height:270px;" src="//img.youtube.com/vi/$2/0.jpg" class="post-image"/></a></div>
                                            [password_crypt] => $6$rounds=25000$
                                            [password_crypt_version] => 1
                                            [allowed_html] => a[href|title],p,br,li,ol,ul,strong,em,u,h2,b,i,tt,div,img[src|alt|title],hr
                                            [post_url] => /hokachan/post.php
                                            [referer_match] => /^https?:\/\/localhost\/hokachan\/([0-9a-zA-Z$_\x{0080}-\x{FFFF}]{1,58}\/(index\.html|\d+\.html)?|[0-9a-zA-Z$_\x{0080}-\x{FFFF}]{1,58}\/res\/(\d+\.html|\d+\+50\.html)|mod\.php\?\/.+)([#?](.+)?)?$/ui
                                            [image_blank] => /hokachan/static/blank.gif
                                            [image_sticky] => /hokachan/static/sticky.gif
                                            [image_locked] => /hokachan/static/locked.gif
                                            [image_bumplocked] => /hokachan/static/sage.gif
                                            [uri_thumb] => /hokachan/a/thumb/
                                            [uri_img] => /hokachan/a/src/
                                            [uri_stylesheets] => /hokachan/stylesheets/
                                            [url_stylesheet] => /hokachan/stylesheets/style.css
                                            [url_javascript] => /hokachan/main.js
                                            [additional_javascript_url] => /hokachan/
                                            [uri_flags] => /hokachan/static/flags/%s.png
                                            [version] => 6.0.0 dev6
                                        )

                                    [mod] => Array
                                        (
                                            [id] => 1
                                            [type] => 30
                                            [username] => admin
                                            [boards] => Array
                                                (
                                                    [0] => *
                                                )

                                        )

                                    [pdo] => PDO Object
                                        (
                                        )

                                    [query] => PreparedQueryDebug Object
                                        (
                                            [query:protected] => PDOStatement Object
                                                (
                                                    [queryString] => SELECT * FROM `posts_a` WHERE `thread` = :id ORDER BY `id`
                                                )

                                            [explain_query:protected] => 
                                        )

                                    [post] => Array
                                        (
                                            [id] => 3
                                            [thread] => 6
                                            [subject] => 
                                            [email] => 
                                            [name] => Anonymous
                                            [trip] => 
                                            [capcode] => 
                                            [body] => tester
                                            [body_nomarkup] => tester
                                            [time] => 1500893034
                                            [bump] => 1500893034
                                            [files] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => oswald.jpg
                                                            [type] => image/jpeg
                                                            [tmp_name] => C:\xampp\tmp\php3F5D.tmp
                                                            [error] => 0
                                                            [size] => 28050
                                                            [filename] => oswald.jpg
                                                            [extension] => jpg
                                                            [file_id] => 1500893034028
                                                            [file] => deleted
                                                            [is_an_image] => 1
                                                            [hash] => efdb65c5cd5a39b38ab6e3d6a67e1f1b
                                                            [width] => 364
                                                            [height] => 248
                                                            [thumbwidth] => 200
                                                            [thumbheight] => 137
                                                            [file_path] => a/src/deleted
                                                            [thumb_path] => a/thumb/1500893034028.png
                                                        )

                                                )

                                            [num_files] => 1
                                            [filehash] => efdb65c5cd5a39b38ab6e3d6a67e1f1b
                                            [password] => amV_CH+v
                                            [ip] => ::1
                                            [sticky] => 0
                                            [locked] => 0
                                            [cycle] => 0
                                            [sage] => 0
                                            [embed] => 
                                            [mod] => 1
                                            [has_file] => 1
                                        )

                                    [targetBoard] => b
                                    [shadow] => 
                                    [clone] => rename
                                    [file] => Array
                                        (
                                            [name] => oswald.jpg
                                            [type] => image/jpeg
                                            [tmp_name] => C:\xampp\tmp\php3F5D.tmp
                                            [error] => 0
                                            [size] => 28050
                                            [filename] => oswald.jpg
                                            [extension] => jpg
                                            [file_id] => 1500893034028
                                            [file] => deleted
                                            [is_an_image] => 1
                                            [hash] => efdb65c5cd5a39b38ab6e3d6a67e1f1b
                                            [width] => 364
                                            [height] => 248
                                            [thumbwidth] => 200
                                            [thumbheight] => 137
                                            [file_path] => a/src/deleted
                                            [thumb_path] => a/thumb/1500893034028.png
                                        )

                                    [i] => 0
                                    [newID] => 6
                                    [op] => Array
                                        (
                                            [id] => 6
                                            [thread] => 
                                            [subject] => 
                                            [email] => 
                                            [name] => Anonymous
                                            [trip] => 
                                            [capcode] => 
                                            [body] => tester
                                            [body_nomarkup] => tester
                                            [time] => 1500892955
                                            [bump] => 1500893034
                                            [files] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => never forget who you are.jpg
                                                            [type] => image/jpeg
                                                            [tmp_name] => C:\xampp\tmp\phpC5A.tmp
                                                            [error] => 0
                                                            [size] => 102927
                                                            [filename] => never forget who you are.jpg
                                                            [extension] => jpg
                                                            [file_id] => 1500892955435
                                                            [file] => deleted
                                                            [is_an_image] => 1
                                                            [hash] => c2cfc986834588ef3a6fe5c22611ee8a
                                                            [width] => 1024
                                                            [height] => 640
                                                            [thumbwidth] => 200
                                                            [thumbheight] => 125
                                                            [file_path] => b/src/1500892955435.jpg
                                                            [thumb_path] => b/thumb/1500892955435.png
                                                        )

                                                )

                                            [num_files] => 1
                                            [filehash] => c2cfc986834588ef3a6fe5c22611ee8a
                                            [password] => amV_CH+v
                                            [ip] => ::1
                                            [sticky] => 0
                                            [locked] => 0
                                            [cycle] => 0
                                            [sage] => 0
                                            [embed] => 
                                            [op] => 1
                                            [has_file] => 1
                                            [mod] => 1
                                        )

                                    [replies] => Array
                                        (
                                        )

                                )

                        )

                )

            [2] => Array
                (
                    [file] => C:\xampp\htdocs\hokachan\mod.php
                    [line] => 177
                    [function] => mod_move
                    [args] => Array
                        (
                            [0] => a
                            [1] => 2
                        )

                )

        )

)
Debug

Array
(
    [sql] => Array
        (
            [0] => Array
                (
                    [query] => SET NAMES utf8
                    [rows] => 0
                    [explain] => 
                    [time] => ~0.13ms
                )

            [1] => Array
                (
                    [query] => SELECT `id`, `type`, `boards`, `password` FROM `mods` WHERE `username` = :username
                    [rows] => 1
                    [explain] => 
                    [time] => ~0.28ms
                )

            [2] => Array
                (
                    [query] => SELECT * FROM `boards` WHERE `uri` = :uri LIMIT 1
                    [rows] => 1
                    [explain] => 
                    [time] => ~0.25ms
                )

            [3] => Array
                (
                    [query] => SELECT * FROM `posts_a` WHERE `id` = :id AND `thread` IS NULL
                    [rows] => 1
                    [explain] => 
                    [time] => ~0.37ms
                )

            [4] => Array
                (
                    [query] => SELECT * FROM `boards` WHERE `uri` = :uri LIMIT 1
                    [rows] => 1
                    [explain] => 
                    [time] => ~0.25ms
                )

            [5] => Array
                (
                    [query] => INSERT INTO `posts_b` VALUES ( NULL, :thread, :subject, :email, :name, :trip, :capcode, :body, :body_nomarkup, :time, :time, :files, :num_files, :filehash, :password, :ip, :sticky, :locked, :cycle, 0, :embed)
                    [rows] => 1
                    [explain] => 
                    [time] => ~0.28ms
                )

            [6] => Array
                (
                    [query] => SELECT * FROM `posts_a` WHERE `thread` = :id ORDER BY `id`
                    [rows] => 1
                    [explain] => 
                    [time] => ~0.31ms
                )

            [7] => Array
                (
                    [query] => SELECT `id` FROM `pms` WHERE `to` = :id AND `unread` = 1
                    [rows] => 0
                    [explain] => 
                    [time] => ~0.28ms
                )

        )

    [exec] => Array
        (
        )

    [purge] => Array
        (
        )

    [cached] => Array
        (
            [0] => board_a (miss)
            [1] => board_a (set)
            [2] => board_b (miss)
            [3] => board_b (set)
            [4] => board_a (hit)
            [5] => pm_unread_1 (miss)
            [6] => pm_unread_1 (set)
        )

    [write] => Array
        (
        )

    [time] => Array
        (
            [db_queries] => ~2.15ms
            [exec] => ~0ms
            [db_connect] => ~11.21ms
            [parse_mod_req] => ~18.57ms
            [total] => ~49.79ms
            [init] => ~8.35ms
        )

    [mod_page] => Array
        (
            [req] => /a/move/2
            [match] => !^/(?P<board>[0-9a-zA-Z$_\x{0080}-\x{FFFF}]{1,58})/move/(\d+)(?:&[^&=]+=[^&]*)*$!u
            [handler] => move
        )

    [included] => Array
        (
            [0] => C:\xampp\htdocs\hokachan\mod.php
            [1] => C:\xampp\htdocs\hokachan\inc\functions.php
            [2] => C:\xampp\htdocs\hokachan\inc\display.php
            [3] => C:\xampp\htdocs\hokachan\inc\template.php
            [4] => C:\xampp\htdocs\hokachan\inc\database.php
            [5] => C:\xampp\htdocs\hokachan\inc\events.php
            [6] => C:\xampp\htdocs\hokachan\inc\api.php
            [7] => C:\xampp\htdocs\hokachan\inc\mod\auth.php
            [8] => C:\xampp\htdocs\hokachan\inc\polyfill.php
            [9] => C:\xampp\htdocs\hokachan\captcha\functions.php
            [10] => C:\xampp\htdocs\hokachan\captcha\cool-php-captcha-0.3.1\captcha.php
            [11] => C:\xampp\htdocs\hokachan\inc\lib\parsedown\Parsedown.php
            [12] => C:\xampp\htdocs\hokachan\inc\config.php
            [13] => C:\xampp\htdocs\hokachan\inc\instance-config.php
            [14] => C:\xampp\htdocs\hokachan\inc\cache.php
            [15] => C:\xampp\htdocs\hokachan\inc\lib\webm\posthandler.php
            [16] => C:\xampp\htdocs\hokachan\inc\bans.php
            [17] => C:\xampp\htdocs\hokachan\inc\lib\IP\Lifo\IP\IP.php
            [18] => C:\xampp\htdocs\hokachan\inc\lib\IP\Lifo\IP\BC.php
            [19] => C:\xampp\htdocs\hokachan\inc\lib\IP\Lifo\IP\CIDR.php
            [20] => C:\xampp\htdocs\hokachan\inc\mod\pages.php
            [21] => C:\xampp\htdocs\hokachan\inc\lib\Twig\Autoloader.php
            [22] => C:\xampp\htdocs\hokachan\inc\lib\Twig\Extensions\Node\Trans.php
            [23] => C:\xampp\htdocs\hokachan\inc\lib\Twig\Node.php
            [24] => C:\xampp\htdocs\hokachan\inc\lib\Twig\NodeInterface.php
            [25] => C:\xampp\htdocs\hokachan\inc\lib\Twig\Extensions\TokenParser\Trans.php
            [26] => C:\xampp\htdocs\hokachan\inc\lib\Twig\TokenParser.php
            [27] => C:\xampp\htdocs\hokachan\inc\lib\Twig\TokenParserInterface.php
            [28] => C:\xampp\htdocs\hokachan\inc\lib\Twig\Extensions\Extension\I18n.php
            [29] => C:\xampp\htdocs\hokachan\inc\lib\Twig\Extension.php
            [30] => C:\xampp\htdocs\hokachan\inc\lib\Twig\ExtensionInterface.php
            [31] => C:\xampp\htdocs\hokachan\inc\lib\Twig\Extensions\Extension\Tinyboard.php
            [32] => C:\xampp\htdocs\hokachan\inc\lib\Twig\Loader\Filesystem.php
            [33] => C:\xampp\htdocs\hokachan\inc\lib\Twig\LoaderInterface.php
            [34] => C:\xampp\htdocs\hokachan\inc\lib\Twig\ExistsLoaderInterface.php
            [35] => C:\xampp\htdocs\hokachan\inc\lib\Twig\Environment.php
            [36] => C:\xampp\htdocs\hokachan\inc\lib\Twig\Extension\Core.php
            [37] => C:\xampp\htdocs\hokachan\inc\lib\Twig\Extension\Escaper.php
            [38] => C:\xampp\htdocs\hokachan\inc\lib\Twig\Extension\Optimizer.php
            [39] => C:\xampp\htdocs\hokachan\inc\lib\Twig\Extension\Staging.php
            [40] => C:\xampp\htdocs\hokachan\templates\cache\89\02\e32c135184f0d312e845216fa92d3b8f6dc2f2a5d1b733bc5ae542a5a577.php
            [41] => C:\xampp\htdocs\hokachan\inc\lib\Twig\Template.php
            [42] => C:\xampp\htdocs\hokachan\inc\lib\Twig\TemplateInterface.php
        )

    [memory] => 2 MiB
) 
Circlepuller commented 7 years ago

My guess on a temporary fix is to add if (isset($file['thumb']) above line 1317 in inc/mod/pages.php. It's because $file['thumb'] seems to be removed when a file is deleted, and it doesn't realize that.

Circlepuller commented 7 years ago

https://github.com/Circlepuller/Tinyboard/commit/64cf4b11ee50609238704b348912b664e6b55d51

czaks commented 7 years ago

Thanks, merged.

On Mon, Jul 24, 2017 at 9:02 PM, Dan Saunders notifications@github.com wrote:

Circlepuller/Tinyboard@64cf4b1 https://github.com/Circlepuller/Tinyboard/commit/64cf4b11ee50609238704b348912b664e6b55d51

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vichan-devel/vichan/issues/234#issuecomment-317522422, or mute the thread https://github.com/notifications/unsubscribe-auth/AAV69ga4v6cXvYsGgwi6nkBdJrrDos7Sks5sROovgaJpZM4N9mQZ .

27chan commented 7 years ago

Same error in spoiler image.

Circlepuller commented 7 years ago

@27chan should be fixed now.

27chan commented 7 years ago

@Circlepuller retorn this error

copy(dev/thumb/spoiler): failed to open stream: No such file or directory

Circlepuller commented 7 years ago

Any line numbers/etc? I have a feeling I know where this is happening but I want to be certain.

27chan commented 7 years ago

Only this error.

ghost commented 7 years ago

I think i fixed the spoiler error. file errors may have something to do with the root of deleted.png not going were it's supposed to go. It will give image not found when you see a deleted image from the front end aka not as a mod.

Circlepuller commented 7 years ago

Yeah, that is pretty much it. Do you have fixes done or should I get to them?

ghost commented 7 years ago

I'm still working on this error :

rename(b/src/deleted,b/src/deleted): The system cannot find the file specified. (code: 2)

Go back

Error information

Array
(
    [file] => C:\xampp\htdocs\hokachan\inc\mod\pages.php:1189
    [errno] => 2
    [error] => rename(b/src/deleted,b/src/deleted): The system cannot find the file specified. (code: 2)
    [backtrace] => Array
        (
            [0] => Array
                (
                    [file] => C:\xampp\htdocs\hokachan\inc\functions.php
                    [line] => 340
                    [function] => error
                    [args] => Array
                        (
                            [0] => rename(b/src/deleted,b/src/deleted): The system cannot find the file specified. (code: 2)
                            [1] => 1
                            [2] => Array
                                (
                                    [file] => C:\xampp\htdocs\hokachan\inc\mod\pages.php:1189
                                    [errno] => 2
                                    [error] => rename(b/src/deleted,b/src/deleted): The system cannot find the file specified. (code: 2)
                                    [backtrace] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [file] => C:\xampp\htdocs\hokachan\inc\mod\pages.php
                                                    [line] => 1189
                                                    [function] => rename
                                                    [args] => Array
                                                        (
                                                            [0] => b/src/deleted
                                                            [1] => b/src/deleted
                                                        )

                                                )

                                            [1] => Array
                                                (
                                                    [file] => C:\xampp\htdocs\hokachan\mod.php
                                                    [line] => 177
                                                    [function] => mod_move_reply
                                                    [args] => Array
                                                        (
                                                            [0] => b
                                                            [1] => 28
                                                        )

                                                )

                                        )

                                )

                        )

                )

I'm kinda stuck on it.

ghost commented 7 years ago

I thought

if ($file['thumb'] != 'spoiler' || $file['thumb'] != 'deleted' ) { //trying to move/copy the spoiler thumb raises an error

would fix it though.

Circlepuller commented 7 years ago

Will look into tonight

ghost commented 7 years ago

sure thanks the error occurs when you try to move a reply with deleted image.

ghost commented 7 years ago

Might have fixed it like this. need to test if it doesn't screw up other things though.

if (isset($file['thumb'])) 
if ($file['thumb'] != 'spoiler' || $file['thumb'] != 'deleted') { //trying to move/copy the spoiler thumb raises an error
                rename($file['file_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $file['file']);
                    rename($file['thumb_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb']);
                }

seems like you need to add it 2 times around line 1189 and 1360.

Circlepuller commented 7 years ago

IMO what I think needs to be done is treat $file['thumb'], $file['thumb_path'], ($file['file'] and $file['file_path'] in the case of deletion) differently when files are spoilered or deleted, such as set $file['thumb_path'] to null (when deleted or spoilered) and $file['file_path'] to null (when deleted), and set $file['file'] to 'deleted' (when deleted) and $file['thumb'] to 'deleted', or 'spoiler'. In this case, you could just check via Twig like {% if file.thumb == 'deleted' %}...{% elseif file.thumb == 'spoiler' %}...{% else %}...{% endif %}. It's awfully simple to handle once implemented since you could just link to the original deleted and spoiler images in static/.

Also, I feel the wording of this explanation is godawful, haha.

ghost commented 7 years ago

Yeah it's fixed. it needed to skip the rename src file check of deleted i think. thought it had something to do with the thumb at first not reading it was an src error ¯_(ツ)_/¯. I added the fix in my pull request.

ctrlcctrlv commented 7 years ago

Issue claimed resolved by deleted user.