nickdunn/publish_tabs — Issue #9: Data Type: Expecting Array, Receiving Boolean
Author: wjn
Created: 2011-11-17 19:24:03+00:00
State: open

Hi Nick,

Thanks as always for your labor in the Symphony community. I'm having an issue that appears to be related to data type boolean/array that I wanted to pass on your way.

reset() expects parameter 1 to be array, boolean given
/Users/wjn/Sites/pcpc.org/subdomains/flo/public/extensions/publish_tabs/fields/field.publish_tabs.php line 42

37
38	public function prepareTableValue($data, XMLElement $link=NULL, $entry_id=NULL) {
39
40	// build this entry fully
41	$em = new EntryManager(Administration::instance());
42	$entry = reset($em->fetch($entry_id));
43
44	// get the first field inside this tab
45	$field_id = Symphony::Database()->fetchVar('id', 0, "SELECT `id` FROM `tbl_fields` WHERE `parent_section` = '".$this->get('parent_section')."' AND `sortorder` = ".($this->get('sortorder') + 1)." ORDER BY `sortorder` LIMIT 1");
46	$field = $em->fieldManager->fetch($field_id);

Please let me know what other information you might need from me to assist you best.

I'm running this using _Symphony 2.2.3_.