views:

12

answers:

1

I've got this odd problem.

If I make a call on that function through amfphp service browser and give it a valid ID and leave the $num_images field blank amfphp will actually pass a blank string as the argument.

// if i call this function width just an ID
function getWorkers($id, $num_images = 100) {
    ...
    // num_images will be set as ''
}

I can easily override using a check:

function getWorkers($id, $num_images = 100) {
    if($num_images=='') $num_images = 100;
    ...
    // num_images will now be really set as 100
}

Anyone experiencing the same with amfphp?

+1  A: 

That's odd, I never got that from AMFPHP. If you don't have the latest version try updating your installation of AMFPHP. Also make sure Flash doesn't somehow pass an empty variable as the second variable.

(Copied from the comment.)

Francisc
@Francisc thks!
Frankie