Skip to content

Return import rows as objects - #22

Merged
martialblog merged 2 commits into
NETWAYS:mainfrom
Saeid-Abadi:fix/rows-as-objects
Nov 12, 2026
Merged

martialblog merged 2 commits into
NETWAYS:mainfrom
Saeid-Abadi:fix/rows-as-objects

Conversation

@Saeid-Abadi

Copy link
Copy Markdown
Contributor

Since v0.5.0 (#18, use sysparm_display_value), fetchData() returns rows as associative arrays. The Director expects every row to be an object as soon as property modifiers are applied, so import sources with modifiers fail with:

Every imported row MUST be an object (ImportSource.php:312)

In v0.4.0 the rows were still objects (json_decode without assoc).

This casts each row to an object before returning it to the Director. Nested values stay arrays, which the Director handles as regular property values.

@martialblog martialblog self-assigned this Oct 27, 2026

@martialblog martialblog left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a look at the original report and I think what we see might be a symptom not the cause of the actual error

Image

What I think is going is, the request fails and then response is empty and thus there are not object.

The module always has returned assoc. arrays.

@martialblog
martialblog merged commit 2fce94b into NETWAYS:main Nov 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants