CMS Error

2 posts by 2 authors in: Forums > CMS Builder
Last Post: Yesterday at 8:48pm   (RSS)

In 3.79, I had built some schemas and everything was going along just fine until I broke something. Now when I try to visit that particular list page (all others work) in the CMS, I get a mostly blank screen that says:

Showing all 20 records
explode(): Argument #2 ($string) must be of type string, null given

In the developer log:

explode(): Argument #2 ($string) must be of type string, null given
/home/xxxxxxx/domains/xxxxxxx.com/public_html/cmsb/lib/menus/default/list_functions.php on line 552
https://www.xxxxxxx.com/cmsb/admin.php?menu=tv_shows

so I have done something to run afoul of line 552 of list_functions.php, but I can't figure it out:

// return field label for fieldname in format: articles.title, title, createdBy.username
function _getFieldLabel($fullFieldname) {
  @list($fieldname, $tableName) = array_reverse(explode('.', $fullFieldname));

  // get schema
  $schema = [];
  if  (!$tableName && $GLOBALS['schema']) {
    $schema = &$GLOBALS['schema'];
  }
  else {
    if ($tableName == 'createdBy') { $tableName = 'accounts'; } // workaround for legacy 'createdBy.fieldname' fieldnames
    $schema = loadSchema($tableName, null, true);
  }

  // get label
  $label = $schema[$fieldname]['label'] ?? null;
  return $label;
}

Schema attached. 

Thanks - Kenny

Attachments:

tv_shows.schema.php 5K