Changes by CLaude
Build and Deploy / build (push) Failing after 44s

This commit is contained in:
root
2026-08-18 09:31:05 -01:00
parent 9bee381f6c
commit 30893eb7a7
21 changed files with 276 additions and 85 deletions
+22 -3
View File
@@ -18,10 +18,29 @@ class Program extends Model {
public $next;
public function __construct($data) {
// Convert arrays to objects for consistent handling
if(is_array($data)) {
$data = (object) $data;
}
parent::__construct($data);
// Ensure id is a string, not an array
if(is_array($this->id)) {
$this->id = $this->id[0] ?? '';
}
// Ensure name is a string, not an array
if(is_array($this->name)) {
$this->name = $this->name[0] ?? '';
}
if(isset($data->suffix) && $data->suffix) {
$this->name .= ' ' . $data->suffix;
$suffix = $data->suffix;
if(is_array($suffix)) {
$suffix = $suffix[0] ?? '';
}
$this->name .= ' ' . $suffix;
}
if($this->recent && $this->recent) {
@@ -37,7 +56,7 @@ class Program extends Model {
}
}
if(isset($data->email) && ($mailComma = strpos($data->email, ',')) !== false) {
if(isset($data->email) && ($mailComma = strpos((string) $data->email, ',')) !== false) {
$this->email = substr($data->email, 0, $mailComma);
}
@@ -46,7 +65,7 @@ class Program extends Model {
$this->rerun = $data->state == 3;
}
$this->url = "/{$this->id}/" . parent::url_slug($this->name);
$this->url = "/{$this->id}/" . parent::url_slug($this->name ?? '');
}
public function isSpecial() {