Expected Behaviour
$job = $this->client()->jobs->get(1234)->waitForCompletion();
count($job->target_files); // returns 1
empty($job->target_files); // should return true
isset($job-> target_files); // should return false
Current Behaviour
$job = $this->client()->jobs->get(1234)->waitForCompletion();
count($job->target_files); // returns
empty($job->target_files); // returns false
isset($job-> target_files); // returns true
Possible Solution
This looks to be an instance of php/php-src#19036
ZamzarObject should probably implement __isset as well as __get.
Steps to Reproduce
- Create an API job that returns >1 target file.
- Run the code in the "expected behaviour section"
- Observe that
empty($job->target_files) and isset($job-> target_files) return the wrong values
Environment
zamzar-php 2.1.1
- PHP 7.2.34
Expected Behaviour
Current Behaviour
Possible Solution
This looks to be an instance of php/php-src#19036
ZamzarObjectshould probably implement__issetas well as__get.Steps to Reproduce
empty($job->target_files)andisset($job-> target_files)return the wrong valuesEnvironment
zamzar-php2.1.1