Skip to content

Commit

Permalink
Make sure top level always has a type also when it not has a header
Browse files Browse the repository at this point in the history
  • Loading branch information
arnemorken committed Nov 27, 2024
1 parent c256957 commit 09b7b9b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions data/mysql/anyTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -1804,12 +1804,11 @@ public function prepareData($id=null)
$topidx = "+".$id;
$data = array("data" => array($topidx => array()));

// Set header and "head"
// Set "head" and header
$data["data"][$topidx]["head"] = $this->mType;
$hdr = $this->findHeader($this->mType,$this->mData,$id);
if (isset($hdr) && $hdr != "") {
$data["data"][$topidx]["head"] = $this->mType;
if (isset($hdr) && $hdr != "")
$data["data"][$topidx][$this->mNameKey] = $hdr;
}

// Set data
if (isset($this->mData)) {
Expand Down

0 comments on commit 09b7b9b

Please sign in to comment.