Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted July 9, 20222 yr 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 July 9, 20222 yr by teraßyte
July 11, 20222 yr 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
July 11, 20222 yr 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