From:             piratos at coftware dot de
Operating system: Windows XP
PHP version:      5.2.4
PHP Bug Type:     Variables related
Bug description:  Somtimes NULL Values

Description:
------------
str_replace makes correkt changes. everay time i make an echo with the var
it is coorect,

But sometimes if i use the result value as a params to another function
the value is null.

Reproduce code:
---------------
 $neu= "ALTER TABLE `cms_content_props` ADD INDEX ( `prop_name` )  ";
 $sql=str_replace('`cms_',"`".$config['db_prefix'],$neu);
 echo $sql; // it shows always the correct value
 $db->Execute($sql);  // but in function $sql has a value uf NULL.

// this occurs after 10 ..14 times working with the same sequence but
different values of $neu

if i use this

  $neu= "ALTER TABLE `cms_content_props` ADD INDEX ( `prop_name` )  ";
  $db->Execute(str_replace('`cms_',"`".$config['db_prefix'],$neu));


no error


-- 
Edit bug report at http://bugs.php.net/?id=43195&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=43195&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=43195&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=43195&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=43195&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=43195&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=43195&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=43195&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=43195&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=43195&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=43195&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=43195&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=43195&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=43195&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=43195&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=43195&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=43195&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=43195&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=43195&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=43195&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=43195&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=43195&r=mysqlcfg

Reply via email to