Skip to content

Commit

Permalink
Update src/Illuminate/Support/Stringable.php
Browse files Browse the repository at this point in the history
Co-authored-by: Faissal Wahabali <fwahabali@gmail.com>
  • Loading branch information
rmunate and faissaloux authored Jul 6, 2024
1 parent 1983916 commit 266a971
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Illuminate/Support/Stringable.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,7 @@ public function compress(int $mode = 5)
*/
public function decompress()
{
$decompressed = gzuncompress($this->value);

if ($decompressed === false) {
throw new \RuntimeException('Failed to decompress the string.');
}

return new static($decompressed);
return new static(Str::decompress($this->value));
}

/**
Expand Down

0 comments on commit 266a971

Please sign in to comment.