Skip to content

Commit 57c2397

Browse files
committed
MDL-78957 libraries: Fix php82 undefined property deprecation
This was detected only in master (4.3dev) because MDL-40084 added a unit test covering it. But the very same patch is needed in 402_STABLE, no matter it's not covered there.
1 parent 1474f74 commit 57c2397

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/odslib.class.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ class MoodleODSWorksheet {
120120
public $rows = array();
121121
public $showgrid = true;
122122
public $name;
123+
/** @var int Max number of rows in the sheet. */
124+
public $maxr = 0;
125+
/** @var int Max number of cols in the sheet. */
126+
public $maxc = 0;
123127

124128
/**
125129
* Constructs one Moodle Worksheet.
@@ -864,8 +868,6 @@ protected function get_ods_content() {
864868
$colstyles = '';
865869

866870
foreach($this->worksheets as $wsnum=>$ws) {
867-
$this->worksheets[$wsnum]->maxr = 0;
868-
$this->worksheets[$wsnum]->maxc = 0;
869871
foreach($ws->data as $rnum=>$row) {
870872
if ($rnum > $this->worksheets[$wsnum]->maxr) {
871873
$this->worksheets[$wsnum]->maxr = $rnum;

0 commit comments

Comments
 (0)