# HG changeset patch # User Michiel Broek # Date 1620024078 -7200 # Node ID 3c8928d956cd6e41d3a1a0e9154a0dacf6793f9a # Parent 4ec5de404bc1d0e65a634049a464d9fc35de5a0f Prevent oversized log message when there is no error. diff -r 4ec5de404bc1 -r 3c8928d956cd www/prod_duplicate.php --- a/www/prod_duplicate.php Sun May 02 22:13:30 2021 +0200 +++ b/www/prod_duplicate.php Mon May 03 08:41:18 2021 +0200 @@ -214,11 +214,11 @@ $sql .= "', json_yeasts='" . str_replace($rescapers,$rreplacements,$row['json_yeasts']); $sql .= "', json_mashs='" . str_replace($rescapers,$rreplacements,$row['json_mashs']); $sql .= "';"; -syslog(LOG_NOTICE, $sql); $result = mysqli_query($link, $sql); if (! $result) { syslog(LOG_NOTICE, "db_product: result: ".mysqli_error($link)); + syslog(LOG_NOTICE, $sql); } else { $lastid = mysqli_insert_id($link); syslog(LOG_NOTICE, "db_product: inserted record ".$lastid);