Przeglądaj źródła

Fix DRG cast from floatval to int in dashboard.php

DRG numbers are integer job identifiers. floatval() was semantically
wrong and would produce incorrect results if a DRG ever exceeded float
precision boundaries.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Benjamin Harris 2 tygodni temu
rodzic
commit
d5962e437f
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      dashboard.php

+ 1 - 1
dashboard.php

@@ -92,7 +92,7 @@ $not_required = "<i class='h2 bi bi-dash-circle-fill'></i>";
 
                             while ($row = mysqli_fetch_array($result)) {
 
-                            	$drg = floatval($row['drg']);
+                            	$drg = (int)$row['drg'];
                                 if ( $row['copy_title'] === '1') { $title = "$check"; } else { $title = "$cross"; }
                                 if ( $row['original_plans'] === '1') { $original_plans = "$check"; } else { $original_plans = "$cross"; }
                                 if ( $row['loa_signed'] === '1') { $loa_signed = "$check"; } else { $loa_signed = "$cross"; }