Skip to content

Commit

Permalink
prevent some warnings with php 8
Browse files Browse the repository at this point in the history
  • Loading branch information
kktuax committed Aug 22, 2024
1 parent 660fe64 commit e4ab361
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/PHPStrap/Form/Label.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Label extends FormElement
* @param $FormType
* @param $LabelWidth
*/
public function __construct($Text, $Attribs = array(), $ScreenReaderOnly = false, $FormType, $LabelWidth)
public function __construct($Text = '', $Attribs = [], $ScreenReaderOnly = false, $FormType = FormType::Normal, $LabelWidth = 2)
{
$this->Attribs = $Attribs;
$this->Text = $Text;
Expand Down
2 changes: 1 addition & 1 deletion src/PHPStrap/Form/Validation/FileValidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function makeMandatory(){
* @param array $maxFileSize in bytes, f.e.: 30000
* @return void
*/
public function checkForSize($invalidSizeErrormessage = "Max file size: {0}", $maxFileSize){
public function checkForSize($invalidSizeErrormessage = "Max file size: {0}", $maxFileSize = 30000){
$this->maxFileSize = $maxFileSize;
$this->invalidSizeErrormessage = $invalidSizeErrormessage;
}
Expand Down
2 changes: 1 addition & 1 deletion src/PHPStrap/Pager.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private function addStyledItem($Content = "", $Href = "#", $Styles = array()){
);
}

private static function styles($Styles = array(), $Disabled){
private static function styles($Styles = array(), $Disabled = FALSE){
$styles = $Styles;
if($Disabled){
$styles[] = 'disabled';
Expand Down

0 comments on commit e4ab361

Please sign in to comment.