mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-05-02 06:26:16 -04:00
revert scalar type hints to retain support for PHP < 7.0
This commit is contained in:
parent
fb0c9c595e
commit
f58cbefd1e
2 changed files with 3 additions and 3 deletions
|
@ -86,7 +86,7 @@ abstract class AbstractModel
|
|||
* @param string $id
|
||||
* @throws Exception
|
||||
*/
|
||||
public function setId(string $id)
|
||||
public function setId($id)
|
||||
{
|
||||
if (!self::isValidId($id)) {
|
||||
throw new Exception('Invalid paste ID.', 60);
|
||||
|
@ -154,7 +154,7 @@ abstract class AbstractModel
|
|||
* @param string $id
|
||||
* @return bool
|
||||
*/
|
||||
public static function isValidId(string $id)
|
||||
public static function isValidId($id)
|
||||
{
|
||||
return (bool) preg_match('#\A[a-f\d]{16}\z#', (string) $id);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue