From 4f747e2eb8e5054a8836eb99e0e4ef7fd1f623e2 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 21 Nov 2019 14:50:47 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/product/class/api_products.class.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index 6010f6dbcdf..faf312e77ff 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -849,7 +849,7 @@ class Products extends DolibarrApi return $prodattr; } - + /** * Get attributes by ref. * @@ -866,23 +866,23 @@ class Products extends DolibarrApi if(! DolibarrApiAccess::$user->rights->produit->lire) { throw new RestException(401); } - + $sql = "SELECT rowid, ref, label, rang FROM ".MAIN_DB_PREFIX."product_attribute WHERE ref LIKE '". trim($ref) ."' AND entity IN (".getEntity('product').")"; - + $query = $this->db->query($sql); - + if (!$this->db->num_rows($query)) { throw new RestException(404); } - + $result = $this->db->fetch_object($query); - + $attr = []; $attr['id'] = $result->rowid; $attr['ref'] = $result->ref; $attr['label'] = $result->label; $attr['rang'] = $result->rang; - + return $attr; }