mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-09 01:12:33 +01:00
Fix scrutinizer bug reports
This commit is contained in:
@@ -104,7 +104,7 @@ class Documents extends DolibarrApi
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$this->invoice = new Facture($this->db);
|
||||
$result = $this->invoice->fetch(0, $ref);
|
||||
$result = $this->invoice->fetch(0, preg_replace('/\.[^\.]+$/', '', basename($original_file)));
|
||||
if( ! $result ) {
|
||||
throw new RestException(404, 'Invoice not found');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user