Skip to content
New issue

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

Cannot access offset of type string on string - when calling Model::pluck('id', 'string column'); #1162

Closed
bretto36 opened this issue Dec 19, 2021 · 1 comment

Comments

@bretto36
Copy link

  • Telescope Version: Recording Pause #4.6.9
  • Laravel Version: 8.65
  • PHP Version: 8.1
  • Database Driver & Version: mysql 5.7

Description:

When having telescope enabled i am getting an error Cannot access offset of type string on string when calling Model::pluck() with the second parameter as a string column.

78 if (! isset($this->hydrationEntries[$modelClass])) {
79 $this->hydrationEntries[$modelClass] = IncomingEntry::make([
80 'action' => 'retrieved',
81 'model' => $modelClass,
82 'count' => 1,
83 ])->tags([$modelClass]);
84
85 Telescope::recordModelEvent($this->hydrationEntries[$modelClass]);
86 } else {
87 $this->hydrationEntries[$modelClass]->content['count']++;
88 }
89 }

Turning off the Model watcher stops the error and my code completes correctly.

Steps To Reproduce:

@driesvints
Copy link
Member

Hi there,

Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!

Thanks.

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

No branches or pull requests

2 participants