#1 April 13, 2014 10:56am

tamtt
Member
Registered: March 30, 2014
Posts: 2

'zero' value is converted to empty string.

Hi,


Possible a bug in below function, It make '0' is convert to empty string value.


//File: cms.php

function replaceInternalPageLinks($html) {
            $drop_count = 0;


            //Bug: This block convert '0' to empty string.
            if (!trim($html)) {
                return "";
            }
            /////////////////////////////////////


            if (substr($html,0,6) == "ipl://") {
                $html = $this->getInternalPageLink($html);
            } else {
                $html = $this->replaceRelativeRoots($html);
                $html = preg_replace_callback('^="(ipl:\/\/[a-zA-Z0-9\:\/\.\?\=\-]*)"^',array($this,"replaceInternalPageLinksHook"),$html);
            }
           
            return $html;
        }

Offline

#2 April 14, 2014 2:13am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 932

Re: 'zero' value is converted to empty string.

Thanks for the bug report! The issue should be fixed in the 4.0-devel and 4.1-devel branches. Here's the 4.0-devel commit:
https://github.com/bigtreecms/BigTree-C … 1569be4c33

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.