php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #856 Problems with string starting with "e"
Submitted: 1998-10-18 07:15 UTC Modified: 1998-12-19 11:58 UTC
From: eric at maclands dot net Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.5 OS: Linux 2.0.34
Private report: No CVE-ID: None
 [1998-10-18 07:15 UTC] eric at maclands dot net
Following problem:
A form sends data in a variable (GET) namend $astr. An SQL query is composed with this string. Works fine unless $astr starts with a little "e". Example:

$sql_statement = "SELECT sym_name, gid FROM groups WHERE sym_name LIKE '%$astr%' "."OR g_disc LIKE '%$astr%' ORDER BY sym_name";

results in ($astr = "efg"):

SELECT sym_name, gid FROM groups WHERE sym_name LIKE '9.411446e-270fg%' OR g_disc LIKE '5.503297e-270fg%' ORDER BY sym_name

That doesn't change when using (string)$astr or when I do $bstr=strval($astr) (and $bstr in the source)...


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-12-19 11:58 UTC] rasmus
Closing this one.  There is no way the bug is caused by the fact that the string starts with an e.  There may be other factors, but you can submit a new report with better information if you are still having trouble.
 [2021-08-17 21:21 UTC] git@php.net
Automatic comment on behalf of cmb69
Revision: https://github.com/php/doc-en/commit/f33541d1561d9cf39eda962d02693f2fd90c3eae
Log: Fix #856: preg_grep returns false on failure
 [2021-08-18 01:33 UTC] git@php.net
Automatic comment on behalf of sy-records
Revision: https://github.com/php/doc-zh/commit/2d0c3a5047594661cafffc51dbfac61659de1450
Log: Update preg-grep.xml
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 29 11:01:32 2024 UTC