Bug #16898 Updated: type convertation problem in pow()

From: Date: Mon, 29 Apr 2002 10:28:21 +0000
Subject: Bug #16898 Updated: type convertation problem in pow()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-6436@lists.php.net to get a copy of this message
ID: 16898 Updated by: mfischer@php.net Reported By: sasha@xxi.co.il -Status: Open +Status: Feedback Bug Type: *Math Functions Operating System: Linux PHP Version: 4.2.0 New Comment: PHP automagically tries to convert the passed data to a number representation. Please paste the exact values you are using to call this pow() Previous Comments: ------------------------------------------------------------------------ [2002-04-29 06:17:23] sasha@xxi.co.il $result=mysql_query("SELECT id, cdate FROM newspaper WHERE path='".substr($a, strrpos($a, "/")+1, strlen($a))."'") or die (mysql_error()); $rec=mysql_fetch_array($result); $e=pow(2, $rec[id]); //Warning! it's looks like what pow() function can't convert $rec[id] variable from string to integer automatically. Using $rec[id]=stettype($rec[id], "int"); helps ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16898&edit=1

« previous php.bugs (#6436) next »