Jump to content

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


Recommended Posts

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
Link to comment
Share on other sites

  • Recently Browsing   0 members

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