Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions lib/GaletteAuto/Auto.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,16 +254,16 @@
$this->name = $r->car_name;
$this->first_registration_date = $r->car_first_registration_date;
$this->first_circulation_date = $r->car_first_circulation_date;
$this->mileage = $r->car_mileage;
$this->mileage = $r->car_mileage != null ? (int)$r->car_mileage : null;
$this->comment = $r->car_comment;
$this->chassis_number = $r->car_chassis_number;
$this->seats = $r->car_seats;
$this->horsepower = $r->car_horsepower;
$this->engine_size = $r->car_engine_size;
$this->seats = $r->car_seats != null ? (int)$r->car_seats : null;
$this->horsepower = $r->car_horsepower != null ? (int)$r->car_horsepower : null;
$this->engine_size = $r->car_engine_size != null ? (int)$r->car_engine_size : null;
$this->creation_date = $r->car_creation_date;
$this->fuel = (int)$r->car_fuel;
$this->fuel = $r->car_fuel != null ? (int)$r->car_fuel : null;
//External objects
$this->picture = new Picture($this->plugins, (int)$this->id);
$this->picture = new Picture($this->plugins, $this->id);
$fpk = Finition::PK;
$this->finition->load((int)$r->$fpk);
$cpk = Color::PK;
Expand All @@ -279,7 +279,7 @@
$this->owner->load($this->owner_id);
$spk = State::PK;
$this->state->load((int)$r->$spk);
$this->history->load((int)$this->id);
$this->history->load($this->id);
}

/**
Expand Down Expand Up @@ -852,7 +852,7 @@
if (isset($_FILES['photo'])) {
if ($_FILES['photo']['tmp_name'] != '') {
if (is_uploaded_file($_FILES['photo']['tmp_name'])) {
$res = $this->picture->store($_FILES['photo']);

Check failure on line 855 in lib/GaletteAuto/Auto.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.4

Call to an undefined method GaletteAuto\Picture::store().

Check failure on line 855 in lib/GaletteAuto/Auto.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.1

Call to an undefined method GaletteAuto\Picture::store().

Check failure on line 855 in lib/GaletteAuto/Auto.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.1

Call to an undefined method GaletteAuto\Picture::store().

Check failure on line 855 in lib/GaletteAuto/Auto.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.4

Call to an undefined method GaletteAuto\Picture::store().

Check failure on line 855 in lib/GaletteAuto/Auto.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.4

Call to an undefined method GaletteAuto\Picture::store().

Check failure on line 855 in lib/GaletteAuto/Auto.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.1

Call to an undefined method GaletteAuto\Picture::store().
if ($res < 0) {
$this->errors[] = $this->picture->getErrorMessage($res);
}
Expand Down
Loading