Library upgrade: CSS Tidy to 1.7.1

Bug #1840099 reported by Rebecca Blundell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Rebecca Blundell
20.04
Fix Released
High
Rebecca Blundell

Bug Description

Related to: https://bugs.launchpad.net/mahara/+bug/1827291

Update CSS Tidy to 1.7.0 for support of nested @media and @supports rules https://github.com/Cerdic/CSSTidy

Changed in mahara:
assignee: nobody → Rebecca Blundell (rjb-dev)
status: New → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/10266

Changed in mahara:
importance: Undecided → High
milestone: none → 19.10.0
Changed in mahara:
milestone: 19.10.0 → 19.10.1
Revision history for this message
Rebecca Blundell (rjb-dev) wrote : Re: Library upgrade: CSS Tidy to 1.7.0

Actually, now the update is to 1.7.1, which includes PHP7.4 updates

no longer affects: mahara/19.10
summary: - Library upgrade: CSS Tidy to 1.7.0
+ Library upgrade: CSS Tidy to 1.7.1
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/10266
Committed: https://git.mahara.org/mahara/mahara/commit/fa31693221a1b1c69e37c26d8716fa80dbca94eb
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: master

commit fa31693221a1b1c69e37c26d8716fa80dbca94eb
Author: Rebecca Blundell <email address hidden>
Date: Fri Aug 16 13:30:23 2019 +1200

Bug 1840099: Update csstidy to 1.7.1

includes fixes for PHP7.4

behatnotneeded

Change-Id: Idedf05146e3b281d40cbfcd4f3fa8529946e9378

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "20.04_STABLE" branch: https://reviews.mahara.org/10898

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/10898
Committed: https://git.mahara.org/mahara/mahara/commit/c8ee5487f93a920b63a175a9455030a9651dde93
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: 20.04_STABLE

commit c8ee5487f93a920b63a175a9455030a9651dde93
Author: Rebecca Blundell <email address hidden>
Date: Fri Aug 16 13:30:23 2019 +1200

Bug 1840099: Update csstidy to 1.7.1

includes fixes for PHP7.4

behatnotneeded

Change-Id: Idedf05146e3b281d40cbfcd4f3fa8529946e9378
(cherry picked from commit fa31693221a1b1c69e37c26d8716fa80dbca94eb)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/10711
Committed: https://git.mahara.org/mahara/mahara/commit/4263848b4e4cc87a57d8719123b7a363bcbebf45
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: master

commit 4263848b4e4cc87a57d8719123b7a363bcbebf45
Author: Rebecca Blundell <email address hidden>
Date: Mon Jan 13 16:19:13 2020 +1300

Bug 1839411: Update Mahara to work with PHP7.3/7.4

Fixed strpos error picked up by 7.3
I haven't found any other 7.3 issues and none have been caught by behat

For 7.4:
-Fixed implode param order (glue, parts)
Note that Mink has a reversed implode not fixed upstream:
external/vendor/behat/mink/src/Selector/Xpath/Escaper.php:50
I have added a function to copy the correct code over in the interim
I also pushed a change to an HTMLPurifier file as it is not fixed upstream
-Changed a variable read by fread to allow for false return type
-Calling a non-array as an array now causes an error, meaning we need to
confirm an array value before attempting to use a variable. An obvious
case is in multi-record db calls the return value is either an array of
results or false. E.g.
$array = db_call();//returns false as no results
//do sth with result
$var = $array[0]//error, trying to access type false as array
//instead we need to check the value before accessing:
$var = !empty($array[0]) ? $array[0] : false //or some equivalent
check of the db_call's return
Because of this change, I have attempted to check all the multi-db
calls for possible false results and include a check for that if there
wasn't already one.
-In conjunction with the previous work, I noticed that trying to use
foreach on a non-iterable result causes an error and that array
functions (i.e. array_keys()) called on a non-array also cause an
error. Where I found them I added checks as well.
-A change in PHP7.2 was that items counted with count() must implement
Countable. (i.e, int/bool is not OK). I fixed the ones I found.
-I used the regex \{\$?\d?[^\s]\} to search for array access using {}
instead of [] and changed those. (Note: the regex pulls in a lot more)
CSStidy has a lot of these that aren't fixed, but those are covered by
the CSStidy upgrade (Bug 1840099)

Change-Id: I64a8feb821433ecd99463762a9999449c50ee32e

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "20.04_STABLE" branch: https://reviews.mahara.org/10929

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/10929
Committed: https://git.mahara.org/mahara/mahara/commit/01eed8e415421e4fd4c8b1976a1d1669287d3305
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: 20.04_STABLE

commit 01eed8e415421e4fd4c8b1976a1d1669287d3305
Author: Rebecca Blundell <email address hidden>
Date: Mon Jan 13 16:19:13 2020 +1300

Bug 1839411: Update Mahara to work with PHP7.3/7.4

Fixed strpos error picked up by 7.3
I haven't found any other 7.3 issues and none have been caught by behat

For 7.4:
-Fixed implode param order (glue, parts)
Note that Mink has a reversed implode not fixed upstream:
external/vendor/behat/mink/src/Selector/Xpath/Escaper.php:50
I have added a function to copy the correct code over in the interim
I also pushed a change to an HTMLPurifier file as it is not fixed upstream
-Changed a variable read by fread to allow for false return type
-Calling a non-array as an array now causes an error, meaning we need to
confirm an array value before attempting to use a variable. An obvious
case is in multi-record db calls the return value is either an array of
results or false. E.g.
$array = db_call();//returns false as no results
//do sth with result
$var = $array[0]//error, trying to access type false as array
//instead we need to check the value before accessing:
$var = !empty($array[0]) ? $array[0] : false //or some equivalent
check of the db_call's return
Because of this change, I have attempted to check all the multi-db
calls for possible false results and include a check for that if there
wasn't already one.
-In conjunction with the previous work, I noticed that trying to use
foreach on a non-iterable result causes an error and that array
functions (i.e. array_keys()) called on a non-array also cause an
error. Where I found them I added checks as well.
-A change in PHP7.2 was that items counted with count() must implement
Countable. (i.e, int/bool is not OK). I fixed the ones I found.
-I used the regex \{\$?\d?[^\s]\} to search for array access using {}
instead of [] and changed those. (Note: the regex pulls in a lot more)
CSStidy has a lot of these that aren't fixed, but those are covered by
the CSStidy upgrade (Bug 1840099)

Change-Id: I64a8feb821433ecd99463762a9999449c50ee32e
(cherry picked from commit 4263848b4e4cc87a57d8719123b7a363bcbebf45)

Robert Lyon (robertl-9)
Changed in mahara:
milestone: 20.04.0 → none
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/11088

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/11088
Committed: https://git.mahara.org/mahara/mahara/commit/d3185269496e841574bb28b7f124419ce0374165
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit d3185269496e841574bb28b7f124419ce0374165
Author: Lisa Seeto <email address hidden>
Date: Tue Jul 28 13:30:50 2020 +1200

Bug 1840099: Library upgrade: CSS Tidy to 1.7.1

- update the readme file with the correct version number

Change-Id: I4f954cc5fbe5c473b4ec5041bfb07642f9731742
Signed-off-by: Lisa Seeto <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "20.04_STABLE" branch: https://reviews.mahara.org/11089

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/11089
Committed: https://git.mahara.org/mahara/mahara/commit/94f9c52d770050f57fb96f572806efc8338a5e36
Submitter: Robert Lyon (<email address hidden>)
Branch: 20.04_STABLE

commit 94f9c52d770050f57fb96f572806efc8338a5e36
Author: Lisa Seeto <email address hidden>
Date: Tue Jul 28 13:30:50 2020 +1200

Bug 1840099: Library upgrade: CSS Tidy to 1.7.1

- update the readme file with the correct version number

Change-Id: I4f954cc5fbe5c473b4ec5041bfb07642f9731742
Signed-off-by: Lisa Seeto <email address hidden>
(cherry picked from commit d3185269496e841574bb28b7f124419ce0374165)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.