We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Steps to reproduce: List the minimal actions needed to reproduce the behavior.
postTasks()
postTasksWithHttpInfo()
Expected behavior: Describe what you expected to happen.
When the date time returned by postTasksWithHttpInfo() is in second, fixDatetimeNanos() doesn't crash.
fixDatetimeNanos()
fixDatetimeNanos() shall check the size returned by explode() before accessing the array elements.
explode()
static function fixDatetimeNanos(string $date) : string { $dateParts = explode(".", $date); $nanosZ = $dateParts[1]; $posZ = strpos($nanosZ, 'Z'); if (strlen($nanosZ) > 9) { $converted = $dateParts[0] . "." . substr($nanosZ, 0, 8); if ($posZ > 0) { $converted .= "Z"; } return $converted; } else { return $date; } }
Actual behavior: Describe What actually happened.
Here is the PHP log for postTasks():
Notice: Undefined offset: 1 in InfluxDB2\ObjectSerializer::fixDatetimeNanos() (line 340 of /var/www/html/vendor/influxdata/influxdb-client-php/src/InfluxDB2/ObjectSerializer.php). InfluxDB2\ObjectSerializer::fixDatetimeNanos('2021-09-27T07:31:07Z') (Line: 272) InfluxDB2\ObjectSerializer::deserialize('2021-09-27T07:31:07Z', '\DateTime', NULL) (Line: 323) InfluxDB2\ObjectSerializer::deserialize(Object, '\InfluxDB2\Model\Task', Array) (Line: 4607) InfluxDB2\Service\TasksService->postTasksWithHttpInfo(Object, NULL) (Line: 4549) InfluxDB2\Service\TasksService->postTasks(Object) (Line: 99)
Specifications:
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Steps to reproduce:
List the minimal actions needed to reproduce the behavior.
postTasks()
through TasksServicepostTasksWithHttpInfo()
is in second precisionExpected behavior:
Describe what you expected to happen.
When the date time returned by
postTasksWithHttpInfo()
is in second,fixDatetimeNanos()
doesn't crash.fixDatetimeNanos()
shall check the size returned byexplode()
before accessing the array elements.Actual behavior:
Describe What actually happened.
Here is the PHP log for
postTasks()
:Specifications:
The text was updated successfully, but these errors were encountered: