Home > Fatal Error > Fatal Error Cannot Re-assign $this Php5

Fatal Error Cannot Re-assign $this Php5

If you get stuck you can get support by emailing [email protected] If this is your first visit, be sure to check out the FAQ by clicking the link above. Dishwasher Hose Clamps won't open At delivery time, client criticises the lack of some features that weren't written on my quote. Why do cars die after removing jumper cables? Any help that can be given would be very much appreciated. navigate here

In all valid cases this should be $x = $this. Use Bazaar for your version control system Read the PHP Spellbook Learn How To Ask Questions The Smart Way Reply With Quote Quick Navigation Upgrading PHP Top Site Areas Settings Private Join them; it only takes a minute: Sign up PHP Fatal error: Cannot re-assign $this up vote 6 down vote favorite I get this error from my script: [Fri Apr 23 Not the answer you're looking for?

I don't know for sure but I wouldn't be surprised if this was to block certain uses of '$this' from static functions/classes and to block masquerading of $this from method parameters. It only makes sense inside functions that belong to a class; however, you are not allowed to use it anywhere else, and you may never assign to it. Frustrating! Soon he'll have to leave the home abd start on his own -- i.e.

Also I don't see any sense no breake BC and valid code only because this assignment is dangerous. [2010-09-03 23:12 UTC] az_startreker at yahoo dot com $this = mysql_last_id(); I got share|improve this answer answered Apr 23 '10 at 15:03 phimuemue 15.4k24381 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign Sure, sometimes they get it wrong, but I don't think that this sort of appeal is going to help anyone. It's hardly suprising Sep 7, 2005,05:42 #11 pachanga View Profile View Forum Posts SitePoint Addict Join Date Mar 2004 Location Russia, Penza Posts 265 Mentioned 0 Post(s) Tagged 0 Thread(s) Originally

Apache is not obeying your .htaccess file. AbraCadaver already told you how to solve the problem: You can't use $this as a variable name, it is reserved: $something_else = $this->createUnique($new); pro-grammarForum Rules | Forum GuidelinesLinkedIn Back to top Perhaps if it's something really basic and obvious I'll do it again. Trying to clarify this situation i posted yet another "Fatal error: Cannot re-assign $this" bug report to Zend and this is the reply i got: [3 Sep 1:41pm CEST] [email protected] Thank

FTP over SSL & SSH with CuteFTP Pro CuteFTP PRO is a popular FTP program for Windows and Mac. It's pure c-level bug and has nothing to do with "new object model" and other blah-blah. It describes how, inside a method, $this points to "this object" that is being operated upon. This should prevent "$this=&$x" (which is wrong), but for some reason it "prevents" "$x=&$this" as well (which is absolutely correct).

Inside is the line 88: $this = new $db( $serv, $user, $pass, $dbName ); What does the error mean and how can I change it? Numerous versions have been released since, but ^&*#[email protected]! Sorry, you're right, my example looks very unnatural. See also MySQL: choosing an API guide and related FAQ for more information.

Teenage daughter refusing to go to school What movie is this? check over here share|improve this answer answered Apr 23 '10 at 15:02 meagar♦ 137k21204240 Well, it isn't in a class, but thanks anyway, and also to the one above. This forum is now closed to new posts, but you can browse existing content. My blog post did pre-date the internals thread and the bug status switch by about 8 hours.

Browse other questions tagged php or ask your own question. But things get even merrier! Not the answer you're looking for? his comment is here Back to top Back to PHP Coding Help · Next Unread Topic → 1 user(s) are reading this topic 0 members, 1 guests, 0 anonymous users Reply to quoted postsClear

installation you will get an empty screen when opening the adminitsration page GO TO directory: admin/includes/classes/ and open upload.php , there is on line // self destruct $this = null; THIS Does my electronic parking brake remain engaged if I disconnect the battery? The time now is 09:53 PM.

Take this code: $x = &$this; $x = 'foo'; For performance reasons we need to catch such references when they happen in order to prevent the object being overwritten inside itself.

Do Morpheus and his crew kill potential Ones? This should prevent "$this=&$x" (which is wrong), but for some reason it "prevents" "$x=&$this" as well (which is absolutely correct). You should change $this to something else and the error should be gone then. Results 1 to 4 of 4 Thread: Fatal error: Cannot re-assign $this after upgrade to PHP5 Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Search Thread

the_laminator Joined:2004-02-10 Posts:5 Posted: Wed, 2004-10-06 00:06 The info you're getting in the errors is unfortunately not very helpful. share|improve this answer answered Oct 8 '13 at 8:25 Aasmund Eldhuset 26.2k23362 Well, I renamed it to dbo, but that only gives me a new error: Fatal error: Call Instead, the MySQLi or PDO_MySQLextension should be used. http://outwardsound.com/fatal-error/fatal-error-cannot-re-assign-this-in-oscommerce.html However there's a workaround for this fatal error which is very simple: using a helper function which simply returns the passed argument by reference.

The bug was reopened and given much more careful attention in the internals dev. It's pure c-level bug and has nothing to do with "new object model" and other blah-blah. Zend really need to sort something out. Why is the reduction of sugars more efficient in basic solutions than in acidic ones?

Originally Posted by pachanga This kind of attitude from PHP core developers seriously worries me It's a sick joke and I've long since given up submitting bugs for this reason.