TypeError thrown

property_exists() expects parameter 2 to be string, integer given