@@ 1586-1609 (lines=24) @@ | ||
1583 | // ereg() is deprecated starting with PHP 5.3. Move PCLZIP_OPT_BY_EREG |
|
1584 | // to PCLZIP_OPT_BY_PREG |
|
1585 | $p_options_list[$i] = PCLZIP_OPT_BY_PREG; |
|
1586 | case PCLZIP_OPT_BY_PREG : |
|
1587 | //case PCLZIP_OPT_CRYPT : |
|
1588 | // ----- Check the number of parameters |
|
1589 | if (($i+1) >= $p_size) { |
|
1590 | // ----- Error log |
|
1591 | PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1592 | ||
1593 | // ----- Return |
|
1594 | return PclZip::errorCode(); |
|
1595 | } |
|
1596 | ||
1597 | // ----- Get the value |
|
1598 | if (is_string($p_options_list[$i+1])) { |
|
1599 | $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; |
|
1600 | } |
|
1601 | else { |
|
1602 | // ----- Error log |
|
1603 | PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1604 | ||
1605 | // ----- Return |
|
1606 | return PclZip::errorCode(); |
|
1607 | } |
|
1608 | $i++; |
|
1609 | break; |
|
1610 | ||
1611 | // ----- Look for options that takes a string |
|
1612 | case PCLZIP_OPT_COMMENT : |
|
@@ 1614-1642 (lines=29) @@ | ||
1611 | // ----- Look for options that takes a string |
|
1612 | case PCLZIP_OPT_COMMENT : |
|
1613 | case PCLZIP_OPT_ADD_COMMENT : |
|
1614 | case PCLZIP_OPT_PREPEND_COMMENT : |
|
1615 | // ----- Check the number of parameters |
|
1616 | if (($i+1) >= $p_size) { |
|
1617 | // ----- Error log |
|
1618 | PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, |
|
1619 | "Missing parameter value for option '" |
|
1620 | .PclZipUtilOptionText($p_options_list[$i]) |
|
1621 | ."'"); |
|
1622 | ||
1623 | // ----- Return |
|
1624 | return PclZip::errorCode(); |
|
1625 | } |
|
1626 | ||
1627 | // ----- Get the value |
|
1628 | if (is_string($p_options_list[$i+1])) { |
|
1629 | $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; |
|
1630 | } |
|
1631 | else { |
|
1632 | // ----- Error log |
|
1633 | PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, |
|
1634 | "Wrong parameter value for option '" |
|
1635 | .PclZipUtilOptionText($p_options_list[$i]) |
|
1636 | ."'"); |
|
1637 | ||
1638 | // ----- Return |
|
1639 | return PclZip::errorCode(); |
|
1640 | } |
|
1641 | $i++; |
|
1642 | break; |
|
1643 | ||
1644 | // ----- Look for options that request an array of index |
|
1645 | case PCLZIP_OPT_BY_INDEX : |