Commit Graph

23370 Commits

Author SHA1 Message Date
Dylan Wagstaff
8c3ba81052
FIX PHP 8.1 support in MySQLiConnector::query errors (#10570)
* FIX PHP 8.1 support in MySQLiConnector::query errors

The default error reporting mode in PHP 8.1 has changed from using
errors reported on the connection handle to throwing
mysqli_sql_exception. query() makes no allowance for this, and
functions up the call stack expect to catch
Silverstripe\ORM\Connect\DatabaseException instead - resulting in the
MySQLi exception going all the way up to halt the system.

We can use a try, catch, and finally to retain backwards compatibility,
no matter which setting (e.g. PHP version default) someone has enabled.

* Move MySQLConnector test skip call into setUp()

As review feedback; marking the test as skipped in a private function
obfuscated where the call was happening and made it harder to skimread
the tests. Moving this into a setUp function makes it obvious the check
is run before each test case, and skipped if necessary.
2023-07-07 15:56:31 +12:00
Thomas Portelange
9391e696bb
use Member::class 2023-06-23 09:35:34 +02:00
Thomas Portelange
2e73b5eeca
Use cached query
Fixes https://github.com/silverstripe/silverstripe-framework/issues/10833
2023-06-22 11:04:26 +02:00
Guy Sartorelli
ab4802caaf
Merge pull request #10829 from creative-commoners/pulls/4.13/fix-last-page
FIX LastPage method returns true if TotalPages equals 0
2023-06-22 11:16:57 +12:00
Sabina Talipova
ad9df97626 FIX LastPage method returns true if TotalPages equals 0 2023-06-22 10:50:41 +12:00
Guy Sartorelli
5303e08d34
Merge pull request #10820 from creative-commoners/pulls/4.13/tx-1686724699
ENH Update translations
2023-06-15 10:06:37 +12:00
Steve Boyd
2ea66922cd ENH Update translations 2023-06-14 18:38:19 +12:00
josephlewisnz
b6a3e3a951
added an additional filter to remove empty array items (#10803)
* ENH Added filter to remove empty/null from Path::join parts

This is to ensure null values are removed and trim() deprecated warnings are not thrown
Fixes #10802

* FIX revert public signature

Co-authored-by: Steve Boyd <emteknetnz@gmail.com>

---------

Co-authored-by: Steve Boyd <emteknetnz@gmail.com>
2023-06-14 15:46:23 +12:00
Guy Sartorelli
6fd7694cbc
Merge pull request #10816 from creative-commoners/pulls/4.13/updatebool
FIX Show correct default value
2023-06-14 13:32:09 +12:00
Steve Boyd
35a8d79f62 FIX Show correct default value 2023-06-14 11:25:34 +12:00
Bram de Leeuw
33c62033fe
Fix translation key for DataObject.GENERALSEARCH (#10805)
* MNT Use gha-dispatch-ci

* Update DataObject.php

Fix typo in GENERALSEARCH localisation

* Update en.yml

remove unnecessary localisation line

* Update nl.yml

remove unnecessary localisation line

* Update eo.yml

remove unnecessary localisation line

* Update ci.yml
2023-06-09 13:44:00 +12:00
Steve Boyd
a211b5eeb5 Merge branch '4.12' into 4.13 2023-05-31 15:49:15 +12:00
Sabina Talipova
a790e5a6c4
Merge pull request #10793 from creative-commoners/pulls/4.13/tx-1685417432
ENH Update translations
2023-05-31 11:27:58 +12:00
Steve Boyd
9d84831756 Merge branch '4.11' into 4.12 2023-05-31 10:19:33 +12:00
Sabina Talipova
e137e0456a
Merge pull request #10794 from creative-commoners/pulls/4.11/backport-http-message
DEP Explicitly require psr/http-message ^1
2023-05-31 10:01:21 +12:00
Steve Boyd
80c51b6bd2 DEP Explicitly require psr/http-message ^1 2023-05-30 16:43:37 +12:00
Steve Boyd
6b49b6cdb6 ENH Update translations 2023-05-30 15:30:32 +12:00
Maxime Rainville
efd3eceebe
Merge pull request #10788 from creative-commoners/pulls/4.13/http-message
DEP Explicitly require psr/http-message ^1
2023-05-24 14:07:55 +12:00
Steve Boyd
e554516193 DEP Explicitly require psr/http-message ^1 2023-05-24 12:26:48 +12:00
Guy Sartorelli
c4b8d9a246
FIX Add back missing SSL support for database connections (#10784) 2023-05-22 12:40:59 +12:00
Guy Sartorelli
ffd0916922
Merge pull request #10786 from michalkleiner/tweak-deprecation-suggestion
FIX Provide correct replacement suggestion in deprecation message
2023-05-22 12:26:40 +12:00
Michal Kleiner
f815a9cf2a
FIX Provide correct replacement suggestion in deprecation message 2023-05-21 20:12:52 +12:00
Guy Sartorelli
2256799916
Merge pull request #10780 from creative-commoners/pulls/4.13/update-tinymc-lang-config
UPD Add support new TinyMC cs_CZ.js
2023-05-16 12:44:45 +12:00
Sabina Talipova
0ab36f6ae1 UPD Add support new TinyMC cs_CZ.js 2023-05-16 11:56:05 +12:00
Guy Sartorelli
234e229098
Merge pull request #9976 from kinglozzer/9975-default-form-action
FIX: Form::defaultAction() didn't work if actions were in CompositeFields (fixes #9975)
2023-05-09 21:45:24 +12:00
Michal Kleiner
218c9942bc
Merge pull request #10772 from creative-commoners/pulls/4.13/gridfieldfilter-regression
FIX Don't assume searchableFields() exists in gridfield filter
2023-05-09 20:29:24 +12:00
Guy Sartorelli
01808a8316
FIX Don't assume searchableFields() exists in gridfield filter 2023-05-09 10:00:07 +12:00
Guy Sartorelli
908b6f2006
Merge branch '4.12' into 4.13 2023-04-26 11:44:54 +12:00
Sabina Talipova
c2733a3108
Merge pull request #10760 from creative-commoners/pulls/4.12/absoluteurl-parsing
Escaped double slash is absolute URL
2023-04-26 11:30:41 +12:00
Sabina Talipova
961499f640
Merge pull request #10759 from creative-commoners/pulls/4.12/gridfieldprint-canview
Check canView before printing from GridField
2023-04-26 11:24:46 +12:00
Guy Sartorelli
1a5bb4cbec
[CVE-2023-22729] Escaped double slash is absolute URL 2023-04-26 09:49:59 +12:00
Guy Sartorelli
fd5d8217e8
[CVE-2023-22728] Check canView before printing from GridField 2023-04-26 09:45:34 +12:00
Steve Boyd
3d03a93b8f Merge branch '4.12' into 4.13 2023-04-11 10:55:17 +12:00
Dylan Wagstaff
92061a3ba6
FIX stabilise typed APIs (#10740)
Since 4.12 the use of typehints and return types has caused issues with
values fetched directly from config without validation. This has lead to
upgrade woes in a minor version (#10721) with no immediate recourse
other than manual system intervention.

To use types, we should ensure types, leaving a stable API that won't
error on a bad value - or should give a thoughtful and directive error
message if so.

Issue #10721 summary:
SessionMiddleware runs before FlushMiddleware
SessionMiddleware causes a PHP fatal error passing `null` to a `string`
parameter.
`null` comes from config, because default string value doesn't exist. We
need flush for this - but system execution never makes it that far.
2023-04-11 10:52:41 +12:00
Guy Sartorelli
a42bb856c3
Merge pull request #10750 from xini/patch-6
FIX: Group visibility for SITETREE_GRANT_ACCESS permissions
2023-04-11 09:58:43 +12:00
Florian Thoma
cd946b6c80
Group visibility for SITETREE_GRANT_ACCESS permissions
Make groups visible if member has SITETREE_GRANT_ACCESS permissions, otherwise the dropdown for selecting the group is empty
2023-04-05 16:33:41 +10:00
Guy Sartorelli
600f188287
MNT Revert erroneous dependency changes (#10739) 2023-03-28 16:46:46 +13:00
Guy Sartorelli
a62e554409
Merge pull request #10733 from creative-commoners/pulls/4.13/searchable
FIX Respect searchable_fields
2023-03-23 11:51:02 +13:00
Steve Boyd
0f40cc38ec FIX Respect searchable_fields 2023-03-23 10:57:03 +13:00
Guy Sartorelli
0d041e7d7d
Merge pull request #10730 from creative-commoners/pulls/4.13/fix-depr
FIX Reduce array method calls
2023-03-22 11:34:10 +13:00
Steve Boyd
41bb35f3f3 FIX Reduce array method calls 2023-03-22 11:06:23 +13:00
Guy Sartorelli
e47eedff7d
Merge pull request #10725 from zemiacsik/patch-ArrayList-fix
FIX property_exists() parameters mixup
2023-03-20 18:52:02 +13:00
zemiacsik
d60af9d16e
FIX property_exists() parameters mixup
ensure that property parameter is a string
2023-03-14 08:42:22 +01:00
zemiacsik
5b8d61b55b
FIX property_exists() parameters mixup
property_exists() has first parameter "object_or_class" and second is a property to check
2023-03-13 13:51:48 +01:00
Guy Sartorelli
77cbe20ba9
MNT Update development dependencies 2023-03-10 16:29:44 +13:00
Guy Sartorelli
75b7622a21
MNT Update release dependencies 2023-03-10 16:29:40 +13:00
Guy Sartorelli
a387c9b9e4
MNT Update development dependencies 2023-03-10 12:21:27 +13:00
Guy Sartorelli
a4929a171e
Merge pull request #10697 from creative-commoners/pulls/4/nicer-deprecations
ENH Improve deprecation logging
2023-03-09 14:39:51 +13:00
Guy Sartorelli
f29577853a
Merge pull request #10720 from creative-commoners/pulls/4/tx-1678079865
ENH Update translations
2023-03-08 10:25:02 +13:00
Steve Boyd
a37be27bd7 ENH Update translations 2023-03-06 18:17:45 +13:00