Need suggestion on "Call to a member function save() on null" |
01-13-2022, 08:53 AM
(This post was last modified: 01-13-2022, 08:54 AM by captain-sensible. Edit Reason: added text )
whats your database situation and which one are you using ?
member function is same as class method ; either no data to pass to database or something up with database and its set up . Don't forget the data you pass in for fields has to match field names in database. A lateral thinking approach might be to populate database, just a manual population of a couple of entries, then see if you can retrieve data using a contoller and pass to view. if that works then try and save. The less going on the easier to see the mistake . I started with an sqlite database in fact I stuck with it , since WordPress has proved that security of MySQL or Maria is not necessarily more secure than sqlite. IN fact I stuck with sqlite for web. Also you can simply use sqlitebrowser to view /populate data quickly - no phpMyAdmin A general approach would be to start trimming out the bloat - all that validation and increase output of error . At line 35 in app/Config/Logger.php set it to : Code: public $threshold = 9; hopefully it might be more specific |
Messages In This Thread |
Need suggestion on "Call to a member function save() on null" - by fox2000 - 01-13-2022, 12:52 AM
RE: Need suggestion on "Call to a member function save() on null" - by captain-sensible - 01-13-2022, 08:53 AM
RE: Need suggestion on "Call to a member function save() on null" - by iRedds - 01-13-2022, 11:33 AM
RE: Need suggestion on "Call to a member function save() on null" - by asadali - 01-14-2022, 04:06 AM
|