View Issue Details

IDProjectCategoryView StatusLast Update
0008721mantisbtupgradepublic2008-01-19 04:24
ReporterNT Assigned Tovboctor  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSRedhat 
Product Version1.1.0 
Target Version1.1.1Fixed in Version1.1.1 
Summary0008721: css and icon paths incorrect
Description

After upgrading to 1.1.0 the css and icon file paths were incorrect.

The problem was caused by the soap_api_path processing in config_defaults_inc.php.

stripos (and strpos) should not be checked before use as indexes as they 'may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE, such as 0 or "" ' (in my case thet returned '').

The line
$t_path = substr( $t_path, 0, $t_soap_api_path_pos );
replaced $t_path with an empty string.

To get around this problem I replaced
if ( $t_soap_api_path_pos == ( strlen( $t_path ) - strlen( $t_soap_api_path ) ) ) {
$t_path = substr( $t_path, 0, $t_soap_api_path_pos );
}

with
if ( $t_soap_api_path_pos != FALSE) {
if ( $t_soap_api_path_pos == ( strlen( $t_path ) - strlen( $t_soap_api_path ) ) ) {
$t_path = substr( $t_path, 0, $t_soap_api_path_pos );
}
}

TagsNo tags attached.

Relationships

related to 0008681 closedvboctor Mantis 1.1.0 has a dependency on stripos which was added in PHP 5 
has duplicate 0008716 closedvboctor File does not exist: /var/www/localhost/htdocs/{images,css} 
has duplicate 0008750 closedvboctor $g_path incorrectly initialized in config_defaults_inc.php when stripos returns false 

Activities

NT

NT

2008-01-08 08:42

reporter   ~0016584

This is related to issue 8681.

NT

NT

2008-01-08 08:45

reporter   ~0016585

Just spotted - problem also reported as issue 8716

vboctor

vboctor

2008-01-09 03:16

manager   ~0016599

Fixed by svn:4870