diff options
| author | Stefan | 2010-03-25 09:58:17 +0100 |
|---|---|---|
| committer | Stefan | 2010-03-25 09:58:17 +0100 |
| commit | b1ec7badeca0e687c185df5649e7f60850f41f13 (patch) | |
| tree | d7a350e37e7836c250475c54a7232e292db8ce30 /execute.c | |
| parent | a331832a4283323894c96203a3d419873e04c8d2 (diff) | |
Fix error case return values of random number generator for PHP 5.2.x, too
Diffstat (limited to '')
| -rw-r--r-- | execute.c | 12 |
1 files changed, 0 insertions, 12 deletions
| @@ -1409,9 +1409,6 @@ static int ih_srand(IH_HANDLER_PARAMS) | |||
| 1409 | long seed; | 1409 | long seed; |
| 1410 | 1410 | ||
| 1411 | if (zend_parse_parameters(argc TSRMLS_CC, "|l", &seed) == FAILURE || SUHOSIN_G(srand_ignore)) { | 1411 | if (zend_parse_parameters(argc TSRMLS_CC, "|l", &seed) == FAILURE || SUHOSIN_G(srand_ignore)) { |
| 1412 | #ifndef PHP_ATLEAST_5_3 | ||
| 1413 | RETVAL_FALSE; | ||
| 1414 | #endif | ||
| 1415 | return (1); | 1412 | return (1); |
| 1416 | } | 1413 | } |
| 1417 | 1414 | ||
| @@ -1420,9 +1417,6 @@ static int ih_srand(IH_HANDLER_PARAMS) | |||
| 1420 | } else { | 1417 | } else { |
| 1421 | suhosin_srand(seed TSRMLS_CC); | 1418 | suhosin_srand(seed TSRMLS_CC); |
| 1422 | } | 1419 | } |
| 1423 | #ifndef PHP_ATLEAST_5_3 | ||
| 1424 | RETVAL_TRUE; | ||
| 1425 | #endif | ||
| 1426 | return (1); | 1420 | return (1); |
| 1427 | } | 1421 | } |
| 1428 | 1422 | ||
| @@ -1432,9 +1426,6 @@ static int ih_mt_srand(IH_HANDLER_PARAMS) | |||
| 1432 | long seed; | 1426 | long seed; |
| 1433 | 1427 | ||
| 1434 | if (zend_parse_parameters(argc TSRMLS_CC, "|l", &seed) == FAILURE || SUHOSIN_G(mt_srand_ignore)) { | 1428 | if (zend_parse_parameters(argc TSRMLS_CC, "|l", &seed) == FAILURE || SUHOSIN_G(mt_srand_ignore)) { |
| 1435 | #ifndef PHP_ATLEAST_5_3 | ||
| 1436 | RETVAL_FALSE; | ||
| 1437 | #endif | ||
| 1438 | return (1); | 1429 | return (1); |
| 1439 | } | 1430 | } |
| 1440 | 1431 | ||
| @@ -1443,9 +1434,6 @@ static int ih_mt_srand(IH_HANDLER_PARAMS) | |||
| 1443 | } else { | 1434 | } else { |
| 1444 | suhosin_mt_srand(seed TSRMLS_CC); | 1435 | suhosin_mt_srand(seed TSRMLS_CC); |
| 1445 | } | 1436 | } |
| 1446 | #ifndef PHP_ATLEAST_5_3 | ||
| 1447 | RETVAL_TRUE; | ||
| 1448 | #endif | ||
| 1449 | return (1); | 1437 | return (1); |
| 1450 | } | 1438 | } |
| 1451 | 1439 | ||
