The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Call to deprecated uniq() function in apache2 template

Discussion in 'EasyApache' started by thobarn, Dec 21, 2010.

  1. thobarn

    thobarn Well-Known Member

    Joined:
    Apr 25, 2008
    Messages:
    153
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    sanctum sanctorum
    WHM 11.28.52

    Regenerating Apache configuration file by running /usr/local/cpanel/bin/build_apache_conf generates the following messages:

    Call to deprecated uniq() function in apache2 template. Please replace this function call with Template Toolkit's built-in unique() array virtual method, e.g. change "uniq( some_array )" to "some_array.unique()".

    due to changing from

    [%- FOREACH domain IN uniq(domains_list) %]

    to

    [%- FOREACH domain IN domains_list.unique() %]

    both in vhost.default (line 109) and ssl_vhost.default (line 123)
     
    #1 thobarn, Dec 21, 2010
    Last edited: Dec 21, 2010
  2. cPanelKeithS

    cPanelKeithS Active Member
    Staff Member

    Joined:
    Oct 14, 2008
    Messages:
    31
    Likes Received:
    1
    Trophy Points:
    8
    I don't show the error on my rebuild and this is the contents in my templates folder

    root@test [~]# grep -n -R uniq /var/cpanel/templates/apache2
    /var/cpanel/templates/apache2/vhost.default:109: [%- FOREACH domain IN domains_list.unique() %]
    /var/cpanel/templates/apache2/ssl_vhost.default:123: [%- FOREACH domain IN domains_list.unique() %]

    Can you provide the output of the above as well as the output of the following?

    root@test [~]# /scripts/easyapache --version
     
Loading...
Similar Threads - Call deprecated uniq()
  1. esaesa
    Replies:
    1
    Views:
    223

Share This Page