|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-10-04 12:13 UTC] sjon at hortensius dot net
[2018-10-04 12:16 UTC] kalle@php.net
-Status: Open
+Status: Feedback
[2018-10-04 12:16 UTC] kalle@php.net
[2018-10-04 12:16 UTC] kalle@php.net
-Package: Apache2 related
+Package: *General Issues
[2018-11-18 22:38 UTC] cmb@php.net
-Status: Feedback
+Status: No Feedback
[2018-11-18 22:38 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 04:00:01 2025 UTC |
Description: ------------ When error_log is run it addes extra lines to a variable like #12#11#11 Yet code runs correctly. Test script: --------------- <?php require "../standard/functions.php"; $d = ""; $temp = "data;"; // Check to make sure we have correct request method post and that the token key fits if ($_SERVER ["REQUEST_METHOD"] == "POST" && ! empty ( $_POST ["T"] ) && $_POST ["T"] == $TOKEN_LOCK_HTTP_POST) { if (!empty($_POST["d"])) { $d = $_POST["d"]; } // define variables and set to empty values $con = get_database_connection (); // If there is a result echo the results $sqlStatment = prepare_sql("select * from table,table2 WHERE table.id = table2.id and table2.serial = '$d';"); error_log($sqlStatment,0); if ($res = $con->query($sqlStatment)) { $res->data_seek(0); $totalRows = $res->num_rows; // Return the total number of rows if ($totalRows > 0) { while ($row = $res->fetch_assoc()) { $temp .= $row['f']; } } $res->close(); } else { $temp .= "-100"; } echo $temp; } ?> Expected result: ---------------- I expect error_log to log: select * from table,table2 WHERE table.id = table2.id and table2.serial = '$d'; But it logs: select * from table,table2 WHERE table#12#11#11.id = table2.id and table2.serial = '$d'; Yet the code works correctly. The logging is messed up in more then one of my files. Actual result: -------------- But it logs: select * from table,table2 WHERE table#12#11#11.id = table2.id and table2.serial = '$d';