Skip to content

"Object of class stdClass could not be converted to string" since 1.38 #253

@leonardfischer

Description

@leonardfischer

Hi there,

first of all - thanks for the great API client! Since I updated to the latest version (1.38.1) I get errors when searching for Jira issues. But this happenes only sometimes (it seems to depend on the found issues):

$issues = (new IssueService($configuration))->search($jql, 0, 5)->issues;

Results in

Object of class stdClass could not be converted to string
[...] Base->error()
[vendor/netresearch/jsonmapper/src/JsonMapper.php:213] settype()
[vendor/netresearch/jsonmapper/src/JsonMapper.php:278] JsonMapper->map()
[vendor/netresearch/jsonmapper/src/JsonMapper.php:384] JsonMapper->map()
[vendor/netresearch/jsonmapper/src/JsonMapper.php:263] JsonMapper->mapArray()
[vendor/lesstif/php-jira-rest-client/src/Issue/IssueService.php:526] JsonMapper->map()
[...] JiraRestApi\Issue\IssueService->search()

I use PHP 7.2.15 and collect Jira issues via CLI command. When reverting to the previous version (1.37) the code works without any problems.

The error itself happens in netresearch/jsonmapper but I saw there hasn't been any release in the last years.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions