Skip to content

Commit f8e3a97

Browse files
authored
Merge pull request from GHSA-jpwx-ffjq-wr4w
1 parent b7c2a06 commit f8e3a97

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

kernel/private/classes/ezcontentobjectstate.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ static function definition()
6767
*/
6868
public static function fetchById( $id )
6969
{
70+
$id = (int)$id;
7071
$states = self::fetchByConditions( array( "ezcobj_state.id=$id" ), 1, 0 );
7172
$state = count( $states ) > 0 ? $states[0] : false;
7273
return $state;
@@ -145,6 +146,7 @@ private static function fetchByConditions( $conditions, $limit, $offset )
145146
*/
146147
public static function fetchByGroup( $groupID, $limit = false, $offset = false )
147148
{
149+
$groupID = (int)$groupID;
148150
return self::fetchByConditions( array( "ezcobj_state_group.id=$groupID" ), $limit, $offset );
149151
}
150152

kernel/private/classes/ezcontentobjectstategroup.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public static function definition()
6565
*/
6666
public static function fetchById( $id )
6767
{
68+
$id = (int)$id;
6869
$stateGroups = self::fetchByConditions( array( "ezcobj_state_group.id=$id" ), 1, 0 );
6970
$stateGroup = count( $stateGroups ) > 0 ? $stateGroups[0] : false;
7071
return $stateGroup;

0 commit comments

Comments
 (0)