• Resolved jodybethw

    (@jodybethw)


    I am using the latest version of the plugin (5.8.1.20). When trying to activate the plugin, I got this error:

    Parse error: syntax error, unexpected 'clone' (T_CLONE), expecting identifier (T_STRING) in /home/shalomraleigh/public_html/wp-content/plugins/events-manager/classes/em-datetime.php on line 156

    This prevented the plugin from being activated. So I have removed this entire section, which includes line 156:
    `/**
    * Easy chainable cloning function, useful for situations where you may want to manipulate the current date,
    * such as adding a month and getting the DATETIME string without changing the original value of this object.
    * @return EM_DateTime
    */
    public function clone(){
    return clone $this;
    }`
    Now the plugin activates. But I am worried that when I upgrade to the next version, I will get this error all over again and the plugin will not work. Is this section of code important to the plugin functioning properly? Do I need to do something on my end to fix the error, or is it just a bug?

    • This topic was modified 7 years, 2 months ago by jodybethw.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    I get this too, I’ve let the devs know about it. should get fixed soon.

    Thread Starter jodybethw

    (@jodybethw)

    Thanks!

    The next Dev version, which should be released soon, will contain a fix for this issue.

    Ditto – giving the White Screen of Death:

    2017/12/15 11:03:13 [error] 25415#25415: *580030 FastCGI sent in stderr: “PHP message: PHP Parse error: syntax error, unexpected ‘clone’ (T_CLONE), expecting identifier (T_STRING) in /var/www/html/www.victoriahislop.com/cms/wp-content/plugins/events-manager/classes/em-datetime.php on line 156

    nginx/1.10.3 (Ubuntu)
    PHP 5.6.32-1+ubuntu16.04.1+deb.sury.org+1 (cli)
    mysql Ver 14.14 Distrib 5.7.20, for Linux (x86_64)

    …with Cloudflare running in front

    I had to rename the plugin folder to get the site back.

    This problem has now been fixed. Can you test with the latest Dev version?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Parse error: syntax error, unexpected ‘clone’ (T_CLONE), expecting identifier (T’ is closed to new replies.