Posts by jsphpndr

    Here is the code.

    This warning can be seen at https://cliftonheritage.net. Everything seemed fine until I uploaded to the live server.


    Warning: array_key_exists(): The first argument should be either a string or an integer in /home/cliftonheritage/public_html/cms/core/lib/PerchTemplate.class.php on line 1074

    The above error is what appeared above my perch_content_custom() listings:

    error.png


    PHP
    1. <?php
    2. perch_content_custom('Attraction Content',[
    3. 'count' => 5,
    4. 'sort-order' => 'RAND',
    5. 'page' => '/plan-your-visit/places-to-go/*',
    6. 'template' => '_places-to-go.html',
    7. 'each' => function($item) { $item['title'] = perch_page_attribute('pageTitle', ['_id' => $item['_pageID']], true); return $item; }
    8. ]) ?>


    This is what I get from debug. It's on my MAMP server, but nothing's printing out to the screen.

    Code
    1. Array
    2. ( [type] => 2 [message] => array_key_exists(): The first argument should be either a string or an integer [file] => /home/cliftonheritage/public_html/cms/core/lib/PerchTemplate.class.php [line] => 1074
    3. )