SQLSTATE[22003]: Numeric value out of range: 7 ERROR:  input is out of range (Connection: pgsql, SQL: select * from (select users.*, 
            (6371 * acos(cos(radians(8.6147407)) * cos(radians(CAST(users.latitude AS DOUBLE PRECISION))) 
            * cos(radians(CAST(users.longitude AS DOUBLE PRECISION)) - radians(76.8347291)) + sin(radians(8.6147407)) * sin(radians(CAST(users.latitude AS DOUBLE PRECISION))))) 
            AS distance from "users" where "is_active" = 1 and "is_admin" = 0 and "id" not in (159) and users.latitude ~ '^[+-]5([0-9]*[.])?[0-9]+$' and users.longitude ~ '^[+-]?([0-9]*[.])?[0-9]+$') as sub where "distance" <= ?)