View Issue Details

IDProjectCategoryView StatusLast Update
0008681mantisbtupgradepublic2008-01-19 04:24
ReportervboctorAssigned Tovboctor 
PrioritynormalSeverityblockReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.1.0 
Target Version1.1.1Fixed in Version1.1.1 
Summary0008681: 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:
$t_soap_api_path_pos = stripos( $t_path, $t_soap_api_path );

With:
$t_soap_api_path_pos = strpos( strtolower( $t_path ), $t_soap_api_path );

TagsNo tags attached.

Relationships

has duplicate 0008688 closedvboctor stripos not exists in PHP 4.x 
has duplicate 0008749 closedgiallu Mantis 1.1.0 Call to undefined function: stripos() on sf.net 
related to 0008721 closedvboctor css and icon paths incorrect 

Activities

garethrandall

garethrandall

2007-12-20 09:32

reporter   ~0016475

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?

vboctor

vboctor

2007-12-20 11:54

manager   ~0016477

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? ;)

KPavel

KPavel

2007-12-21 00:27

reporter   ~0016489

Yes I could help, at least testing or correction of mistakes

giallu

giallu

2008-01-02 05:47

reporter   ~0016525

I just committed the change

RavenWebServices

RavenWebServices

2008-01-02 11:38

reporter   ~0016529

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 ));

Related Changesets

MantisBT: master-1.1.x cd6e5474

2008-01-02 10:44:58

giallu

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

Issue History

Date Modified Username Field Change
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 =>