Skip to content

Commit

Permalink
type casting
Browse files Browse the repository at this point in the history
  • Loading branch information
mambax7 committed Jul 28, 2024
1 parent 0560b8b commit f1ed396
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion htdocs/class/xoopsform/formelement.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public function getTitle($encode = true)
if(!isset($this->_caption)) {
$this->_caption = '';
}
if (strlen($this->_description) > 0) {
if (strlen((string)$this->_description) > 0) {
return $encode ? htmlspecialchars(strip_tags($this->_caption . ' - ' . $this->_description), ENT_QUOTES | ENT_HTML5) : strip_tags($this->_caption . ' - ' . $this->_description);
} else {
return $encode ? htmlspecialchars(strip_tags($this->_caption), ENT_QUOTES | ENT_HTML5) : strip_tags($this->_caption);
Expand Down
4 changes: 2 additions & 2 deletions htdocs/install/class/dbmanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function queryFromFile($sql_file_path)
SqlUtility::splitMySqlFile($pieces, $sql_query);
$this->db->connect();
foreach ($pieces as $piece) {
$piece = trim($piece);
$piece = trim((string) $piece);
// [0] contains the prefixed query
// [4] contains unprefixed table name
$prefixed_query = SqlUtility::prefixQuery($piece, $this->db->prefix());
Expand Down Expand Up @@ -301,7 +301,7 @@ public function deleteTables($tables)
*/
public function tableExists($table)
{
$table = trim($table);
$table = trim((string) $table);
$ret = false;
if ($table != '') {
$this->db->connect();
Expand Down

0 comments on commit f1ed396

Please sign in to comment.