#43195 [Opn->Fbk]: Sometimes NULL Values

From: Date: Fri, 09 Nov 2007 00:10:44 +0000
Subject: #43195 [Opn->Fbk]: Sometimes NULL Values
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-119377@lists.php.net to get a copy of this message
ID: 43195 Updated by: jani@php.net Reported By: piratos at coftware dot de -Status: Open +Status: Feedback Bug Type: Variables related Operating System: Windows XP PHP Version: 5.2.4 New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. Previous Comments: ------------------------------------------------------------------------ [2007-11-05 10:47:04] piratos at coftware dot de 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 this bug report at http://bugs.php.net/?id=43195&edit=1

« previous php.bugs (#119377) next »