logo       


mantisbt/core helper_api.php,1.71,1.72: msg#00003

Subject: mantisbt/core helper_api.php,1.71,1.72
Update of /cvsroot/mantisbt/mantisbt/core
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv32082

Modified Files:
        helper_api.php 
Log Message:
Fixed Bug # 0007995: Confusion in product_version values due to string 
comparisons with == operator

Index: helper_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/helper_api.php,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- helper_api.php      25 Apr 2007 06:15:12 -0000      1.71
+++ helper_api.php      5 Sep 2007 11:51:27 -0000       1.72
@@ -105,19 +105,25 @@
                if ( is_array( $p_var ) ) {
                        foreach( $p_var as $t_this_var ) {
                                # catch the case where one entry is 0 and the 
other is a string.
-                               if ( ( is_numeric( $t_this_var ) && 
!is_numeric( $p_val ) ) ||
-                                       ( !is_numeric( $t_this_var ) && 
is_numeric( $p_val ) ) ) {
-                                       continue;
-                               }
-
-                               if ( $t_this_var == $p_val ) {
-                                       echo ' selected="selected" ';
-                                       return;
+                               if ( ( is_string( $p_this_var ) && !is_string( 
$p_val ) ) ) {
+                                       if ( $p_this_var === $p_val ) {
+                                               PRINT ' selected="selected" ';
+                                               return ;
+                                       }
+                               } else if ( $p_this_var == $p_val ) {
+                                       PRINT ' selected="selected" ';
+                                       return ; 
                                }
                        }
                } else {
-                       if ( $p_var == $p_val ) {
-                               echo ' selected="selected" ';
+               if ( is_string( $p_var ) && is_string( $p_val ) ) {
+                       if ( $p_var === $p_val ) {
+                               PRINT ' selected="selected" ';
+                               return ; 
+                       }
+               } else if ( $p_var == $p_val ) {
+                       PRINT ' selected="selected" ';
+                       return ; 
                        }
                }
        }


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/


Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe