]> git.mxchange.org Git - quix0rs-gnu-social.git/commit
Fixes for ticket #3052: some commands started triggering when extra text is supposed...
authorBrion Vibber <brion@pobox.com>
Mon, 21 Feb 2011 19:42:32 +0000 (11:42 -0800)
committerBrion Vibber <brion@pobox.com>
Mon, 21 Feb 2011 20:12:10 +0000 (12:12 -0800)
commiteb7e3ee528e6276f5b7a1a090286130c30beb150
tree649ddb83914050bb884c0c23f300967391fb0c4f
parent11e033f05cd174e8e21a61aec28ed44da91ebe78
Fixes for ticket #3052: some commands started triggering when extra text is supposed to suppress them

Regressions caused by bad refactoring in commit 21feac3bea72b0ecd88a3.
Test cases in tests/CommandInterpreterTest.php were made against the pre-refactoring code, and now check out with the fixed code.
Failures were caused by not changing logic structure when moving from multiple exit points (each if point would return directly with a null or an object) to setting a result variable and then falling through to a common exit point. Without the if statements being restructured, the result variable would just get overridden by the next case.
lib/commandinterpreter.php