Skip to content

PHP version support #78

@jeffpaul

Description

@jeffpaul

Describe the bug
On a test site running PHP 5.6, I get the following syntax error:

[Mon Jun 10 18:19:00 2019] [warn] [client 216.112.17.10] mod_fcgid:
stderr: PHP Parse error: syntax error, unexpected ‘?’ in
/wp-content/plugins/classifai-1.3.0/includes/Classifai/Providers/Watson/NLU.php
on line 267

Steps to Reproduce

  1. Install ClassifAI v1.3.0 on an install running PHP 5.6
  2. Site explodes

Expected behavior
ClassifAI is either unable to be installed and notes the minimum PHP version or catches scenarios where <PHP7 is installed and properly handles it in the code. Could add code to index file to say if PHP < 7, kill the plugin and show an alert.

Screenshots
n/a

Environment information

  • Device: Mac mini (2018)
  • OS: MacOS 10.14.5 (18F132)
  • Browser and version: Firefox 67.0.1 (64-bit)
  • ClassifAI version: 1.3.0
  • Theme and version: Twenty Fifteen 2.5
  • Other installed plugin(s) and version(s): Akismet Anti-Spam Version 4.1.2, Authy Two Factor Authentication Version 3.0.1, Customize Posts Version 0.9.1, Gutenberg Version 5.8.0, Instructables Version 2.0.4, VaultPress Version 1.9.10

Additional context
Issue appears to reference:

$type = $args['input_type'] ?? 'text';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions