General developer forum

My wall post don't work no more. Sniff.

Re: My wall post don't work no more. Sniff.
Core developersParticularly helpful MoodlersPlugin developers

Since Moodle 2.2, any calls to get_context_instance() should be replaced with one of:

  • context_system::instance()
  • context_coursecat::instance($catid)
  • context_course::instance($courseid)
  • context_module::instance($cmid)
  • context_block::instance($blockid)
  • context_user::instance($userid)

It should be fairly easy to work out which.

In terms of DB access, you should never have used mysql_* functions in the first place - you should always use the Moodle DB functions:

The 'session' error may well go away once the other warnings have been fixed (as it is saying it can't start the new session as there has already been some content output - the content that has been output is the other warning messages).

Average of ratings: Useful (1)