Thanks for taking a look at it. The problem I'm having is bizarre, because when I call the function with a static value, i.e.
$resizeAndMove = $upload->processUpload(1);
, it works just fine. The images are resized and moved to the /g_1 directory. but if I do this:
$_SESSION['user_id'] = 1;
$userId = $_SESSION['user_id'];
$upload->processUpload($userId);
It uploads the file to the /g_0 directory and stores 0 in the database as the user_id.
I've been pulling my hair out looking at this, but the only thing I can think of is some type of variable typing problem...
Even if I do this, it still doesn't work:
$userId = (int) $_SESSION['user_id']; //Maybe it is evaluating as Bool?
$userId = ($userId * 1); //Make sure it is looking at $userId as a number
$upload->processUpload($userId); //still evaluates "/uploads/galleries/g_".$userId as /uploads/galleries/g_0
Thanks again for taking the time to help with this. If you're willing, I could upload the entire class for you to review.