• Resolved Craig Ralston

    (@craig-ralston)


    I use this plugin side by side with Flamingo and CF7 very frequently on a lot of sites. I am just wondering if there is a specific reason you are not checking if the ReallySimpleCaptcha class exists before calling it. There are a few themes I have encountered that use the same class and it causes fatal errors.

    I am assuming you intentionally left that check out?

    https://www.ads-software.com/plugins/really-simple-captcha/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    I don’t get what you mean. Contact Form 7 does check if the ReallySimpleCaptcha class exists before calling it.

    I think the OP meant that the THEME he is running is throwing a fatal error because it has a baked-in ReallySimpleCaptcha class. Since the RSC plugin itself doesn’t do a class_exists() check, it’s throwing a fatal error when the plugin tries to load since it tries to redefine a class that already exists.

    That’s how I read it anyway ??

    Thread Starter Craig Ralston

    (@craig-ralston)

    Exactly. Though, I just realized that since the theme is already using the class, I don’t need to use the RSC plugin to add a CAPTCHA field to CF7. I just figured the RSC plugin itself would do a check, but I suppose relying on the actual plugin or theme USING the class to check first is just as effective for the most part.

    Thanks

    Thread Starter Craig Ralston

    (@craig-ralston)

    While I have your attention though – You are the author of both CF7 and RSC, have you ever considered just baking in RSC with CF7? I’m sure you get that question a lot. Just curious if there is a reason behind it.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Really Simple CAPTCHA used to be a part of Contact Form 7, and separated 5 years ago. I wrote the reason here.

    https://ideasilo.wordpress.com/2009/03/14/really-simple-captcha/

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    I just realized that since the theme is already using the class, I don’t need to use the RSC plugin to add a CAPTCHA field to CF7.

    If this mean your theme itself defines ReallySimpleCaptcha class in the theme’s file, the theme is making a serious mistake.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Check if class exists’ is closed to new replies.