| The Arcive of vBulletin Modifications Site. | |
| 
			 
			#1  
			
			
			
			
			
		 | ||||
| 
 | ||||
|  in_array(): Wrong datatype for second argument 
			
			Warning: in_array(): Wrong datatype for second argument on line 123 PHP Code: 
			PHP Code: 
			 | 
| 
			 
			#2  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			Try to change: PHP Code: 
			PHP Code: 
			 | 
| 
			 
			#3  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			Didn't work    | 
| 
			 
			#4  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			before that line: PHP Code: 
			PHP Code: 
			 | 
| 
			 
			#5  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			if (!in_array($getnew['threadid'], explode(',', $threadids))) {
		 | 
| 
			 
			#6  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			Hmmm . . . still don't work, I donno how it didn't since you are all amazing coders . . .  Is there any other way of redoing the in_array.  I also tryed a combination of all of thoes lines but nothing seems to want to work.
		 | 
| 
			 
			#7  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			I'm assuming the contents of $threadids is a list of thread id's. If so the code above should work ^^ I use it all the time with global admin cp options    | 
| 
			 
			#8  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			@Dean: you should look at the code before trying to help: PHP Code: 
			 but it hasn't been intialised in the first loop. that's why i thought the initialisation of it in front of the loop should do it... | 
| 
			 
			#9  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			Putting PHP Code: 
			HOWEVER! This code gives you the exact same results and is cleaner and simpler: PHP Code: 
			You may want to do some benchmarking on your own board to see which method is faster on your forums. Keep in mind that the results (speed-wise) will depend solely on how many new threads / posts there actually are in the result. Good luck   | 
| 
			 
			#10  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			lol I am so stupid . . . The reason the other wern't working was cause I was uploading to the wrong site, but I wasn't paying attection when I clicked connect so that is why. But ya it works now, so thanks. | 
|  | 
| 
 | 
 | 
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
| 
 | |
|  More Information | |
| Template Usage: 
 Phrase Groups Available: 
 | Included Files: 
 Hooks Called: 
 |