The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
Is this proper coding?
Can someone tell me in their opinion if this is proper coding? The following code is the fix for the division by zero error.
I am replacing this: Code:
if ($totalthreads == 0) { $totalthreads = 1; } if ($totalposts == 0) { $totalposts = 1; } With this: Code:
$totalthreads == 0 ? $totalthreads = 1 : $totalthreads; $totalposts == 0 ? $totalposts = 1 : $totalposts; It works, but I am curious as to what your feelings are as to whether this is actually a proper way to do it or not. Can anyone tell I got bored enough to do this? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|