1. Список говнокодов пользователя MrWhite

    Всего: 1

  2. PHP / Говнокод #24078

    +2

    1. 1
    2. 2
    3. 3
    4. 4
    $this->db->query("UPDATE " . DB_PREFIX . "manufacturer SET name = '" . $this->db->escape((string)$data['name']) . "', sort_order = '" . (int)$data['sort_order'] . "' WHERE manufacturer_id = '" . (int)$manufacturer_id . "'");
    		if (isset($data['image'])) {
    			$this->db->query("UPDATE " . DB_PREFIX . "manufacturer SET image = '" . $this->db->escape((string)$data['image']) . "' WHERE manufacturer_id = '" . (int)$manufacturer_id . "'");
    		}

    Opencart https://github.com/opencart/opencart/blob/master/upload/admin/model/catalog/manufacturer.php#L35-L39

    MrWhite, 05 Апреля 2018

    Комментарии (1)