rev 2322 -- first batch of small fixes to Wedge. Attention SMF developers: some minor bugs are mentioned in there that are also in SMF 2.1 as far as I could see. If you can't find the bugs I'm referring to, please open a topic somewhere in the SMF board here, and I'll try to help. At worst, I'll do a pull request, but right now I'm focusing on Wedge issues, so it'll have to wait until I have more time.
24 files changed, 74 insertions(+), 91 deletions(-), 4.72 KiB
! weSkeleton->remove() was expected to return a success value. (Class-Skeleton.php)
! The new ban management code returned $row at one point, instead of $rowData. Blame Pete. (ManageBans.php)
! The 'do_empty_field' feature could never be disabled, due to a typo in the disabler code. Blame Pete. Still, nice feature, not sure why anyone would want to disable it. (Subs-Editor.php)
- pretty_synchronize_topic_urls doesn't provide a return value, no need to output it then... (ManageSettings.php)
! SMF 'bug': While session-related functions are not expected to return a value (it's undocumented, but the official examples provide values), I realized that the SMF implementation was flawed, such as providing a return value from an insert query, which is also undefined. Ahum. Cleaned it all up. (Load.php)
! SMF bug: $_COOKIE['guest_poll_vote'] has three bugs in one line: a 'count' ternary test that can perfectly be eliminated; an explode() used instead of implode() (!!), and the explode itself only has one parameter, since the comma was replaced with a period. (!!!) (Poll.php)
- SMF bug? Error lists in saveProfileFields and groupMembership2 parameters are never used. Also a typo in the documentation for these, hmm. (Profile.php, Profile-Modify.php)
- SMF bug: a beautiful unneeded line indeed... validateSession() never returns any value, and what do you think that test does anyway? (we::$is_member || validateSession()) -- if it's a member, it's true. If it's a guest, it calls the function, which then calls is_not_guest(), which generates an error. Thus skipping the line executed by that test, which... Generated an error. Well, yeah, sure, man, whatever you want. (Profile.php)
- SMF 'bug'? The first parameter in mergePosts() was optional, while the others weren't. (RemoveTopic.php)
! SMF bug: $entryname is used before it's declared. Wrong copy & paste, I guess. (Subs-Package.php)
! ...Which Pete then proceeded to reproduce in his plugin system. Along with an undeclared $path variable, a $dir variable missing its dollar sign (and thus considered as a constant), a $pluginsdir global renamed to '$plugins_dir', and another variable used before it's declared, $full_path, although in this case I think he meant to say $dir. Yeah, that one again... (Subs-Plugins.php)
! Nice one... A file_get_contents call using FILE_BINARY as a flag. Not only is it not necessary (file is considered binary by default), but it's a PHP 6-only flag. In code written at least 4 years ago. Real fun. (Class-Media.php)
* media_handler->resizeJpgImage() returned nothing, and that null return value was used and inverted to turn it into a true value. That's oh-so-badass. But it's also confusing, and fixed by simply forcibly return true. (Class-Media.php)
! show_prevnext() should have returned its output, rather than echoed it. Same for aeva_listFiles(), but as this one's more complicated, I'll just settle on echoing stuff, and then doing an explicit return ''. (Media.template.php)
- Unused function, getZippedfile(). Was buggy anyway. Debug code I'm sure. (Class-Zip.php)
! Undeclared global in aeva_moveAlbum(). It was only used if an error occurred, which I guess, never did happen. (Aeva-Gallery2.php)
- Unused globals. (install.php, Profile-Modify.php, Reports.php, Subs-Members.php)
- Duplicate globals. (ManageBoards.php, MoveTopic.php, Profile-Modify.php, Subs-Menu.php, Media.template.php)
! Missing global. Technically, it's a non-existing global, but it's also for a non-existing function, so who cares. (ManageMaintenance.php)
- Spacinazi, commenazi, etc. (PrettyUrls-Filters.php, Security.php)