Minor - add int casting

pull/2970/head
Julio Montoya 7 years ago
parent b73da946d8
commit c7f1275e24
  1. 1
      plugin/customcertificate/src/index.php

@ -950,6 +950,7 @@ function checkInstanceImage($certificateId, $imagePath, $field, $type = 'certifi
$table = Database::get_main_table(CustomCertificatePlugin::TABLE_CUSTOMCERTIFICATE);
$imagePath = Database::escape_string($imagePath);
$field = Database::escape_string($field);
$certificateId = (int) $certificateId;
$sql = "SELECT * FROM $table WHERE $field = '$imagePath'";
$res = Database::query($sql);

Loading…
Cancel
Save