Fatal Error Cannot Use Assign-op Operators With Overloaded
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Cannot use assign-op operators with overloaded objects nor string offsets up vote 4 down vote favorite I have this portion of code and it gives me the error in the title. I have a count $k from 1 to 5 for each table. $myarray consists of at least 3 to 4 names. The error occurs in the line with $qu .= ... What i tried so far: changing the variablename $i to $v{$i} in the $qu .= line. So is there any possibility to iterate the query? So that it has as many ANDs in the WHERE clause as the count of the array is? while ($k<=5) { $queryname = "SELECT Name FROM description"; $qname = mysql_query($queryname,$link); while ($reihe = mysql_fetch_object($qname)) { { $unse = unserialize($reihe->Name); { foreach ($unse as $j=>$h) foreach ($h as $m) { $myarray = preg_split('/ |\s| /',$m); { echo "
"; $array_empty = $myarray; $empty_elements = array(""); $myarray = array_diff($array_empty,$empty_elements); var_dump($myarray); for ($i=1; $i<=count($myarray); $i++) { $v{$i} = $myarray[$i]; echo $v{$i}; $esc{$i} = strtolower(mysql_escape_string($v{$i})); echo "
" . $esc{$i} . "
"; $qu = "SELECT * FROM `table ID=$k` WHERE"; $qu{$i} .= "AND `table ID=$k`.`name` LIKE '%$esc{$i}%'"; } } } { $test_a = mysql_query($qu,$link) or die (mysql_error()); echo "
"; var_dump($test_a); for ($x=0; $x
'; } } } } } $k++; } php mysql overloaded-strings share|improve this question edited May 24 '12 at 18:39 eggyal 80.9k14971
that make connections all over the world. Join today Download & Extend Drupal Core Distributions Modules Themes AdaptiveThemeIssues Fatal error: Cannot use assign-op operators with overloaded objects nor string offsets PostponedProject:AdaptiveThemeVersion:7.x-3.1Component:MiscellaneousPriority:NormalCategory:Support requestAssigned:UnassignedReporter:raynimmoCreated:December 20, 2012 - 15:46Updated:December 23, 2012 - 07:07 Log in or register to update this issue Jump to:Most recent attachment Started to create an AT sub-theme for a clients site that I am upgrading from D6 to D7 today. All of the upgrade http://stackoverflow.com/questions/10742314/cannot-use-assign-op-operators-with-overloaded-objects-nor-string-offsets went fine, that's not the problem. Set it all up, created the AT sub-theme, enabled it, everything fine at that point. Then into the template settings to set everything up from there before building out the sites CSS styling. Upon saving the settings I encountered a white screen with the message: Fatal error: Cannot use assign-op https://www.drupal.org/node/1871336 operators with overloaded objects nor string offsets in C:\xampp\htdocs\dev\azlawpartner\site\sites\default\themes\adaptivetheme\at_core\inc\preprocess.inc on line 874 As it states Line 875, I had a peek through the code, that section is: if (is_array($vars['attributes']['class'])) { $vars['attributes']['class'][] = 'image-style-' . $style_name_class; } else { Else it's a string, workaround for Media module bug: http://drupal.org/node/1722146 //and User Badges bug: http://drupal.org/node/1748394 $vars['attributes']['class'] .= ' image-style-' . $style_name_class; } with line 874 being: $vars['attributes']['class'] .= ' image-style-' . $style_name_class; I have also had a look at the bugs mentioned in the comments but I am not using Media or User Badges, this is more or less a fresh install on my development machine as I am getting everything up to speed before pushing anything to the live site. I initially managed to recover the installation thankfully without much hassle but after another unsuccessful attempt where I extracted the theme from the archive again and copied the sub-theme codebase out on its own and renamed everything I am now totally locked out of the
Search Username Password Remember Me? Register Lost Password? facebook google twitter rss http://forums.devshed.com/php-development-5/assign-op-operators-overloaded-objects-nor-string-offsets-71020.html Free Web Developer Tools Advanced Search Forum Programming Languages PHP Development Cannot use assign-op operators with overloaded objects nor string offsets https://bugs.php.net/26368 in Thread: Cannot use assign-op operators with overloaded objects nor string offsets in Share This Thread Tweet This + 1 this fatal error Post To Linkedin Subscribe to this Thread Subscribe to This Thread July 19th, 2003,12:11 AM #1 ChibiGuy View Profile View Forum Posts Visit Homepage Contributing User Devshed Newbie (0 - 499 posts) Join Date Apr 2003 Location fatal error cannot USA Posts 477 Rep Power 57 Cannot use assign-op operators with overloaded objects nor string offsets in "Fatal error: Cannot use assign-op operators with overloaded objects nor string offsets in /home/xl-netwo/public_html/gsans/template/templates.class(233) : eval()'d code on line 2" thats the error I get when trying to use this line of code: PHP Code: eval("\$lines[$i].='\n';$OPEN.=\$lines[$i];");
I have no clue what this means. Can anyone help me out? Faq Reply With Quote July 19th, 2003,12:40 AM #2 No Profile Picture micros_bytes View Profile View Forum Posts Contributing User Devshed Novice (500 - 999 posts) Join Date Oct 2002 Posts 790 Re
21:21 UTC From: webmaster at x7chat dot com Assigned: Status: Not a bug Package: Arrays related PHP Version: 4.3.3 OS: Linux, Windows Private report: No CVE-ID: View Add Comment Developer Edit [2003-11-23 15:03 UTC] webmaster at x7chat dot com Description: ------------ A certain script I wrote uses the following line of code: $USER['TEMP'] .= "!"; When I run this some servers (Programmed on Redhat Linux 9 with PHP 4.3.3 and it works fine, tested on another Linux server using PHP 4.3.3 and it returns the error) it returns the following error message: Fatal error: Cannot use assign-op operators with overloaded objects nor string offsets in (FILE PATH) on line (LINE NUMBER) I have asked many different programmers about it and nobody has an answer as to why it causes an error on code that is correct. According to PHP documentation the syntax of it is correct. Another person who has had this problem has documented it here: http://www.faqchest.com/prgm/php-l/php-02/php-0205/php-020581/php02052416_25320.html. I distribute the script for free and I have had at least 4 different users report that they are having this problem. The variable $USER['TEMP'] has been defined before and is not null. Reproduce code: --------------- $q = DoQuery("SELECT * FROM $SERVER[TBL_PREFIX]users WHERE username='$USER[NAME]'"); $USER['TEMP'] = $row[13]; $k = 1; $i = 0; $s = 0; $r[0] = ""; $USER['TEMP'] .= "!"; while($k){ $sub = substr($USER['TEMP'],$i,1); if($sub == "!"){ $k = 0; break; } if($sub == ","){ $s++; }else{ @$r[$s] .= $sub; } $i++; } Expected result: ---------------- I would expect it to add "!" to $USER['TEMP'] every time it goes through the while loop, on some servers it does but on others it returns the error even if they are the same type of server running the same version of PHP. Actual result: -------------- On some servers it works