teraßyte Posted July 9, 2022 Posted July 9, 2022 (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 July 9, 2022 by teraßyte
Daniel F Posted July 11, 2022 Posted July 11, 2022 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 SeNioR- 1
Martin A. Posted July 11, 2022 Posted July 11, 2022 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 SeNioR-, teraßyte and AlexJ 2 1
Recommended Posts