I recently updated my PHPMaker project in older version to v2026, and here are a few things that need to be changed:
- Error
strtotime(): Argument #1 ($datetime) must be of type string, DateTime given
Change this code:
$tgl_update = strtotime($this->TglUpdate->CurrentValue);
to:
$tgl_update = strtotime(ConvertToString($this->TglUpdate->CurrentValue)); - Warning:
Undefined array key "id"
Change this code:
if ($info["id"] == "DB" && IsLocal()) { // Testing on local PC
to:
if (IsLocal()) { // Testing on local PC - Notice:
Only variables should be assigned by reference
Change this code:
$opt = &$this->ListOptions->Add("something");
to:
$opt = $this->ListOptions->Add("something"); - Error
Attempted to call undefined function "EmptyValue" from namespace "PHPMaker2026\…
Change this code:
if (EmptyValue($something)) {
to:
if (IsEmpty($something)) {