$this->Database no longer works in fields
A bug in 2.2, submitted by nickdunn on 10 January 2011
Announcement
Symphony's issue tracker has been moved to Github.
Issues are displayed here for reference only and cannot be created or edited.
Browse
Closed#485: $this->Database no longer works in fields
Sorry, overzealous. Fixed in this commit
It is highly recommended that as developers try to use Symphony::Database()
to access the Database object instead of $this->Database
, $this->_Parent->Database
or $this->_engine->Database()
.
This issue is closed.
This caused a significant number of extensions to break: members, number, order entries, pages select, publish tabs, reflection, search index, unique checkbox; and those were only the ones I’ve tested so far. We are retaining
$_Parent
in the Field class, so can we retain$Database
too?Will that affect memory usage, or is it just a reference pointer?
Seems like a small thing to retain some semblance of backwards compatibility. If all of these extensions do break, there is no chance I’m personally ever going to have the time or inclination to update a site to 2.2 if I have to go through the 40 installed extensions and fix ‘em because the API has changed!