Annotation of pkgsrc/databases/phpldapadmin/patches/patch-lib_functions.php, revision 1.5

1.5     ! khorben     1: $NetBSD: patch-lib_functions.php,v 1.4 2021/02/21 22:22:22 khorben Exp $
1.1       taca        2: 
1.3       taca        3: Fix for PHP 5.5 and later: 
                      4:        https://bugzilla.redhat.com/show_bug.cgi?id=974928
1.1       taca        5: 
1.5     ! khorben     6: --- lib/functions.php.orig     2022-04-15 22:45:43.000000000 +0000
1.1       taca        7: +++ lib/functions.php
1.5     ! khorben     8: @@ -130,12 +130,13 @@ function app_error_handler($errno,$errst
        !             9:                debug_log('Entered (%%)',1,0,__FILE__,__LINE__,__METHOD__,$fargs);
1.4       khorben    10:  
1.5     ! khorben    11:        /**
        !            12: -       * error_reporting will be 0 if the error context occurred
        !            13: -       * within a function call with '@' preprended (ie, @ldap_bind() );
        !            14: +       * error_reporting will be only the non-ignorable error number bits
        !            15: +       * if the error context occurred within a function call with '@'
        !            16: +       * preprended (ie, @ldap_bind() );
        !            17:         * So, don't report errors if the caller has specifically
        !            18:         * disabled them with '@'
        !            19:         */
        !            20: -      if (ini_get('error_reporting') == 0 || error_reporting() == 0)
        !            21: +      if (!(ini_get('error_reporting') & error_reporting() & $errno))
        !            22:                return;
1.4       khorben    23:  
1.5     ! khorben    24:        $file = basename($file);
        !            25: @@ -928,7 +929,7 @@ function get_cached_item($index,$item,$s
1.4       khorben    26:   *
1.5     ! khorben    27:   * Returns true on success of false on failure.
        !            28:   */
        !            29: -function set_cached_item($index,$item,$subitem='null',$data) {
        !            30: +function set_cached_item($index,$data,$item,$subitem='null') {
        !            31:        if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
        !            32:                debug_log('Entered (%%)',1,0,__FILE__,__LINE__,__METHOD__,$fargs);
1.4       khorben    33:  
1.5     ! khorben    34: @@ -2032,8 +2033,8 @@ function ldap_error_msg($msg,$errnum) {
        !            35:   *
        !            36:   * Usage Examples:
        !            37:   *  <code>
        !            38: - *   draw_jpeg_photo(0,'cn=Bob,ou=People,dc=example,dc=com',"jpegPhoto",0,true,array('img_opts'=>"border: 1px; width: 150px"));
        !            39: - *   draw_jpeg_photo(1,'cn=Fred,ou=People,dc=example,dc=com',null,1);
        !            40: + *   draw_jpeg_photo(0,'cn=Bob,ou=People,dc=example,dc=com',0,"jpegPhoto",true,array('img_opts'=>"border: 1px; width: 150px"));
        !            41: + *   draw_jpeg_photo(1,'cn=Fred,ou=People,dc=example,dc=com',1,null);
        !            42:   *  </code>
        !            43:   *
        !            44:   * @param object The Server to get the image from.
        !            45: @@ -2046,7 +2047,7 @@ function ldap_error_msg($msg,$errnum) {
        !            46:   * @param array Specifies optional image and CSS style attributes for the table tag. Supported keys are
        !            47:   *                fixed_width, fixed_height, img_opts.
1.1       taca       48:   */
1.5     ! khorben    49: -function draw_jpeg_photo($server,$dn,$attr_name='jpegphoto',$index,$draw_delete_buttons=false,$options=array()) {
        !            50: +function draw_jpeg_photo($server,$dn,$index,$attr_name='jpegphoto',$draw_delete_buttons=false,$options=array()) {
1.3       taca       51:        if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
                     52:                debug_log('Entered (%%)',1,0,__FILE__,__LINE__,__METHOD__,$fargs);
                     53:  

CVSweb <webmaster@jp.NetBSD.org>