Skip to content

Commit 2ba31fb

Browse files
Merge pull request #1352 from creative-commoners/pulls/7/php84
API Explicity mark nullable parameters for PHP 8.4
2 parents 0020f7d + 1f398f9 commit 2ba31fb

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

code/Control/UserDefinedFormAdmin.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ private static function updateFormSubmissionFolderPermissions()
308308
* @return Folder
309309
* @throws ValidationException
310310
*/
311-
public static function getFormSubmissionFolder(string $subFolder = null): ?Folder
311+
public static function getFormSubmissionFolder(?string $subFolder = null): ?Folder
312312
{
313313
$folderPath = static::config()->get('form_submissions_folder');
314314
if ($subFolder) {

code/Control/UserDefinedFormController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ protected function addUserFormsValidatei18n()
134134
*
135135
* @return array
136136
*/
137-
public function index(HTTPRequest $request = null)
137+
public function index(?HTTPRequest $request = null)
138138
{
139139
$form = $this->Form();
140140
if ($this->Content && $form && !$this->config()->disable_form_content_shortcode) {

code/Model/EditableFormField/EditableFileField.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class EditableFileField extends EditableFormField
6262
* @param Folder|null $folder
6363
* @return string
6464
*/
65-
public static function getFolderPermissionString(Folder $folder = null)
65+
public static function getFolderPermissionString(?Folder $folder = null)
6666
{
6767
$folderPermissions = static::getFolderPermissionTuple($folder);
6868

@@ -84,7 +84,7 @@ public static function getFolderPermissionString(Folder $folder = null)
8484
* @param Folder|null $folder
8585
* @return array
8686
*/
87-
private static function getFolderPermissionTuple(Folder $folder = null)
87+
private static function getFolderPermissionTuple(?Folder $folder = null)
8888
{
8989
$viewersOptionsField = [
9090
InheritedPermissions::INHERIT => _t(__CLASS__.'.INHERIT', 'Visibility for this folder is inherited from the parent folder'),

code/Task/RecoverUploadLocationsHelper.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ protected function recover($fileId, $expectedFolderId)
313313
*
314314
* @return int Number of files recovered
315315
*/
316-
protected function checkResidual($fileId, File $file, File $draft = null)
316+
protected function checkResidual($fileId, File $file, ?File $draft = null)
317317
{
318318
if (!$this->filesVersioned) {
319319
return 0;

0 commit comments

Comments
 (0)