Timeline for \Drupal::database() ->insert - Error: Call to undefined method Using ->condition()?
Current License: CC BY-SA 4.0
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 7, 2019 at 20:49 | comment | added | Shawn Conn |
Yeah, it's a warning you can igore. ->fetchAll() can return an empty array so $queryDB[0] can be undefined. If you want to hide it, do something like check !empty($queryDB) .
|
|
Mar 7, 2019 at 19:00 | comment | added | Prestosaurus |
I see what you're saying about the redundancy. I had started just using $queryDB[0]->value1 != $value1 style PHP checks, everything worked, however, I did get a notice of undefined index from $queryDB[0] , is that something I can ignore?
|
|
Mar 7, 2019 at 18:47 | history | answered | Shawn Conn | CC BY-SA 4.0 |