TypeError thrown

Unsupported operand types: stdClass / int