A Few Things That Need To Be Changed from Older Project to v2026

I recently updated my PHPMaker project in older version to v2026, and here are a few things that need to be changed:

  1. 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));
  2. Warning: Undefined array key "id"
    Change this code:
    if ($info["id"] == "DB" && IsLocal()) { // Testing on local PC
    to:
    if (IsLocal()) { // Testing on local PC
  3. Notice: Only variables should be assigned by reference
    Change this code:
    $opt = &$this->ListOptions->Add("something");
    to:
    $opt = $this->ListOptions->Add("something");
  4. Error Attempted to call undefined function "EmptyValue" from namespace "PHPMaker2026\…
    Change this code:
    if (EmptyValue($something)) {
    to:
    if (IsEmpty($something)) {
1 Like