fix issue #7531: Check for NULL  in FileLocator and updated constructor phpdoc