Skip to content

Commit

Permalink
Fixed some fatals
Browse files Browse the repository at this point in the history
  • Loading branch information
Universal-Omega authored Feb 24, 2024
1 parent f1abcf6 commit f3d8c48
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@
TSPortal follows a basic numerical increase system for releases and not Semantic Versioning.
The main reasoning behind this choice is the software is not built to be extended upon, therefore no stable public API exists.

## [Unreleased](https://github.com/miraheze/TSPortal/compare/v11...master)
## [Unreleased](https://github.com/miraheze/TSPortal/compare/v18...master)

## Version 18 (2024-02-24)

### Fixed

- Fixed "Integrity constraint violation: 1048 Column 'comments' cannot be null" with IAL
- Fixed "Argument 1 ($newFlags) must be of type array, null given" with updating flags

## Version 17 (2024-02-23)

### Fixed

- Fixed IAL fatal errors with accessing undefined index

## Version 16 (2024-02-09)
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function show( User $user )
*/
public function update( Request $request, User $user ): RedirectResponse
{
$user->updateFlags( $request->input( 'new-access' ), $request->user() );
$user->updateFlags( $request->input( 'new-access' ) ?? [], $request->user() );

return back();
}
Expand Down
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
|
*/

'version' => 17,
'version' => 18,

/*
|--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
return response()->json( [ 'unauthorised' => true ] );
}

$comment = $request->input( 'comment' );
$comment = $request->input( 'comment' ) ?? '';
$explodedComment = explode( '#', $comment );

$serialisedID = ( is_array( $explodedComment ) && isset( $explodedComment[1] ) ) ? preg_replace( '/[^a-z\d]/i', '', $explodedComment[1] ) : null;
Expand Down

0 comments on commit f3d8c48

Please sign in to comment.