WR-483012 Fix PHP 8.2 deprecation for dynamic property $rows#224
Conversation
| */ | ||
| class admin_setting_sql_textarea extends \admin_setting_configtextarea { | ||
| /** @var int Number of rows for the textarea. */ | ||
| public $rows; |
There was a problem hiding this comment.
@agaranin Can you check whether line 45 is actually doing anything? As $this->rows does not update the parent's private $rows property, so it may have no effect on the rendered textarea. When calling $html = parent::output_html($data, $query); it will use parent rows.
There was a problem hiding this comment.
Good catch, Guillermo! You were right — line 45 had no effect because $this->rows was writing to the child class's own property, not the parent's private $rows which parent::output_html() actually reads. The textarea height was always controlled by the JS resize() function below, not by the PHP $rows value. I've removed the dead code (public $rows, MIN_ROWS constant, and the assignment on line 45) and force-pushed the fix.
3bb7f6e to
67ba1f4
Compare
No description provided.