Skip to content

Commit

Permalink
Fix: If object already loaded, the url was not returned.
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 11, 2012
1 parent bf9b865 commit a249061
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions htdocs/core/class/html.form.class.php
Expand Up @@ -3765,11 +3765,10 @@ function showbarcode(&$object,$width=100)
if (empty($object->barcode_type_code) || empty($object->barcode_type_coder))
{
$result = $object->fetch_barcode();
//Check if fetch_barcode() failed
if ($result < 1) return '<!-- ErrorFetchBarcode -->';
}

//Check if fetch_barcode() failed
if ($result < 1) return '';

// Barcode image
$url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($object->barcode_type_coder).'&code='.urlencode($object->barcode).'&encoding='.urlencode($object->barcode_type_code);
$out ='<!-- url barcode = '.$url.' -->';
Expand Down

0 comments on commit a249061

Please sign in to comment.