TypeError thrown

readdir(): Argument #1 ($dir_handle) must be of type resource or null, false given