Jump to content

[4.7.0] New unused parameter in "\system\Helpers\Table\Custom::__construct()"


Recommended Posts

Posted (edited)

In \system\Helpers\Table\Custom::__construct() is there any point in adding this new $count parameter when it's not used?

	/**
	 * Constructor
	 *
	 * @param	array			$dataSource		Data source
	 * @param	\IPS\Http\Url	$baseUrl		Base URL
	 */
	public function __construct( $dataSource, \IPS\Http\Url $baseUrl, $count = NULL )
	{
		$this->dataSource = $dataSource;
		$this->count      = \count( $this->dataSource );
		
		return parent::__construct( $baseUrl );
	}

 

Should the code be updated to use it if it's available perhaps?

$this->count      = $count ?? \count( $this->dataSource );

 

Edited by teraßyte
Posted
12 hours ago, Daniel F said:

That's not new, it was there all the time?! and without looking too much because there's more important stuff to do, it seems that we use it in the getRows method

The argument $count in the constructor. Not the class var $count. The method arg was added in 4.7 beta 1

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...