Skip to content

Commit

Permalink
Merge pull request from GHSA-jpwx-ffjq-wr4w
Browse files Browse the repository at this point in the history
  • Loading branch information
glye committed Sep 3, 2021
1 parent b7c2a06 commit f8e3a97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/private/classes/ezcontentobjectstate.php
Expand Up @@ -67,6 +67,7 @@ static function definition()
*/
public static function fetchById( $id )
{
$id = (int)$id;
$states = self::fetchByConditions( array( "ezcobj_state.id=$id" ), 1, 0 );
$state = count( $states ) > 0 ? $states[0] : false;
return $state;
Expand Down Expand Up @@ -145,6 +146,7 @@ private static function fetchByConditions( $conditions, $limit, $offset )
*/
public static function fetchByGroup( $groupID, $limit = false, $offset = false )
{
$groupID = (int)$groupID;
return self::fetchByConditions( array( "ezcobj_state_group.id=$groupID" ), $limit, $offset );
}

Expand Down
1 change: 1 addition & 0 deletions kernel/private/classes/ezcontentobjectstategroup.php
Expand Up @@ -65,6 +65,7 @@ public static function definition()
*/
public static function fetchById( $id )
{
$id = (int)$id;
$stateGroups = self::fetchByConditions( array( "ezcobj_state_group.id=$id" ), 1, 0 );
$stateGroup = count( $stateGroups ) > 0 ? $stateGroups[0] : false;
return $stateGroup;
Expand Down

0 comments on commit f8e3a97

Please sign in to comment.