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|
|Priority||normal||Severity||block||Reproducibility||have not tried|
|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|
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().
|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 10:44:58Details 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
|mod - config_defaults_inc.php||Diff File|
|2007-12-20 02:35||vboctor||New Issue|
|2007-12-20 02:35||vboctor||Status||new => assigned|
|2007-12-20 02:35||vboctor||Assigned To||=> vboctor|
|2007-12-20 09:32||garethrandall||Note Added: 0016475|
|2007-12-20 11:54||vboctor||Note Added: 0016477|
|2007-12-21 00:07||vboctor||Relationship added||has duplicate 0008688|
|2007-12-21 00:27||KPavel||Note Added: 0016489|
|2008-01-02 05:47||giallu||Status||assigned => resolved|
|2008-01-02 05:47||giallu||Fixed in Version||=> 1.1.1|
|2008-01-02 05:47||giallu||Resolution||open => fixed|
|2008-01-02 05:47||giallu||Note Added: 0016525|
|2008-01-02 11:38||RavenWebServices||Note Added: 0016529|
|2008-01-09 03:15||vboctor||Relationship added||related to 0008721|
|2008-01-15 09:30||giallu||Relationship added||has duplicate 0008749|
|2008-01-19 04:24||vboctor||Status||resolved => closed|
|2008-10-20 20:20||Changeset attached||master-1.1.x dd3ee1ec =>|
|2008-11-11 09:03||giallu||Changeset attached||master-1.1.x cd6e5474 =>|