Update Core.php

added check for array_key_exists