MyBB Community Forums

Full Version: ID is set even when empty.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Because of the following code:
	function construct_cell($data, $extra=array())
	{
		foreach(array('class', 'style', 'id') as $field)
		{
			// Common-used fields
			if(!isset($extra[$field]))
			{
				$extra[$field] = '';
			}
		}

		$this->_cells[] = array("data" => $data, "extra" => $extra);
	}

You get directly to the first element with no ID (id="") every time you enter an page that generated an cell with no ID.

Example:
http://root/admin/index.php?module=style-themes&action=edit&tid=1

There you go directly to the first sheet that is inherited from MyBB Master Style.
Seems like an odd way of doing that to be honest, why not just array_merge the two arrays?
The only key that should be checked is 'class', construct_row() already handles the rest.
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/1753

Thanks for contributing to MyBB!

Regards,
The MyBB Group