1

I'm new to this forum so not so sure if I'm posting in the right place or about the full rules and regulations of the forum system, so if I've got something wrong please redirect me and let me know. Basically, I'm receiving a parse error when trying to go onto our website - I had tried restoring my website from an old backup and now it's giving me this error:

Parse error: syntax error, unexpected 'exit' (T_EXIT) in /home/cdchk/domains/dev.cdchk.org/public_html/wp-content/plugins/woocommerce-catalog/include/php/settings.php on line 1

I tried looking into this file (settings.php under the WooCommerce Catalog Plugin files), but am lost as to what the error is. I will post the first section of the code below. Let me know if there's an issue. Thanks.

<?php

if (!defined('ABSPATH')) exit;
class Woo_Catalog_Settings

    {
    private $dir;
    private $file;
    private $assets_dir;
    private $assets_url;
    private $settings_base;
    private $settings;
    public

    function __construct($file)
        {
        $this->file = $file;
        $this->dir = dirname($this->file);
        $this->assets_dir = trailingslashit($this->dir) . 'include';
        $this->assets_url = esc_url(trailingslashit(plugins_url('/include/', $this->file)));
        $this->settings_base = 'woo_Catalog_';

        // Initialise settings

        add_action('admin_init', array(
            $this,
            'init'
        ));
chiranjiv
  • 11
  • 3
  • Possible duplicate of [PHP Parse/Syntax Errors; and How to solve them?](http://stackoverflow.com/questions/18050071/php-parse-syntax-errors-and-how-to-solve-them) – miken32 Jan 07 '16 at 03:01
  • What version of PHP are you using? Have you checked for invisible characters in the file? `cat -v settings.php | head -10` should show you any. – miken32 Jan 07 '16 at 03:05
  • How do I check this? I had just tracked the file via its file pathway after the error showed up and used a online PHP converter to show the code. – chiranjiv Jan 07 '16 at 03:24

0 Answers0