View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008681 | mantisbt | upgrade | public | 2007-12-20 02:35 | 2008-01-19 04:24 |
Reporter | vboctor | Assigned To | vboctor | ||
Priority | normal | Severity | block | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | 1.1.0 | ||||
Target Version | 1.1.1 | Fixed in Version | 1.1.1 | ||
Summary | 0008681: Mantis 1.1.0 has a dependency on stripos which was added in PHP 5 | ||||
Description | Mantis 1.1.0 doesn't work on PHP 4 installations since config_defaults_inc.php uses stripos(). Since Mantis 1.1.0 should be the last release that supports PHP 4, this should be replaced with a combination of strtolower() and strpos(). Replace: With: | ||||
Tags | No tags attached. | ||||
Guess this is a "release process" issue :-) Perhaps a "continuous build" and unit testing framework could be implemented to test all release candidates for regression on previously reported bugs and compatibility issues? |
|
There is always this one issue that pops right after a release ;) I use continuous integration, unit testing, and other agile development aspects in my "day" life (in .NET domain) and I totally believe in it. I am trying to refactor the Mantis APIs to be more unit testable and researching available PHP unit testing frameworks (any suggestions welcome!). However, this task was in config_defaults_inc.php, which I am not planning to unit test (same for all script pages). I am only planning to move as much logic out of them as possible (this was the original target, but in some cases we can still do a better job). The reason I am not unit testing scripts is that they require an Http unit testing engine, which in this case won't be really unit testing. That said, the code that had the issue, can probably move to an API, and hence, it can be unit tested. Short answer, we will get there (in N years), would you like to help? ;) |
|
Yes I could help, at least testing or correction of mistakes |
|
I just committed the change |
|
Just my $.02 worth: I know the efficiency difference is very small, but the PHP5 function is faster than the suggested fix. I would suggest the following to allow for both versions. $t_soap_api_path_pos = (function_exists('stripos')) ? (stripos( $t_path, $t_soap_api_path )) : (strpos( strtolower( $t_path ), $t_soap_api_path )); |
|
MantisBT: master-1.1.x cd6e5474 2008-01-02 05:44 Details Diff |
Fix 8681: Mantis 1.1.0 has a dependency on stripos which was added in PHP 5 git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/branches/BRANCH_1_1_0@4853 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9 |
Affected Issues 0008681 |
|
mod - config_defaults_inc.php | Diff File |