MonthJuly 2013

The script tried to execute a method or access a property of an incomplete object.

You’re getting the error “The script tried to execute a method or access a property of an incomplete object” after trying to access a property or method of an object you’ve stored in a $_SESSION variable in your PHP.

You’ve probably got some code that looks like this:

… trying to do something with the object, it’ll fail …

Change it to this:

… trying to do something with the object, it’ll work …

As you can see including your class definitions before you start the session (where your object is) is what makes this work.

So sure, makes total sense, PHP needs to know about your class definitions before you can access a session object that makes use of that class.

encodeURIComponent() and how it can help in your jQuery AJAX calls

I’ll refine this post to make it easier to read later but am publishing now, to get my thoughts out. Maybe it’ll help in this state.

For starters I’m working with PHP, MySQL, jQuery 1.5.1

When passing data from a jQueryUI dialog to a PHP script via AJAX (jQuery), which performs a very basic database transaction, either INSERT or UPDATE, and the POST’d data includes an amprasand, such as “I want to include this & that for fun”, everything after the “&” doesn’t make it into the record. Now you’re left with “I want to include this “, “& that for fun” doesn’t get inserted or added.

Obviously this is not what we want, right?

© 2017 Mike Homme

Theme by Anders NorenUp ↑