Closed (fixed)
Project:
Views Datasource
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Sep 2012 at 15:38 UTC
Updated:
2 Jan 2015 at 05:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Ivo.Radulovski commentedgot the same error
Comment #2
pasquallehttp://php.net/manual/en/reserved.constants.php#reserved.constants.core
PHP_MAJOR_VERSION Available since PHP 5.2.7
PHP_MINOR_VERSION Available since PHP 5.2.7
https://drupal.org/requirements
Drupal 7: PHP 5.2.5 or higher
before using the php constant there should be a check
if (defined('PHP_MAJOR_VERSION'))Comment #3
cs_shadow commentedAttached is a patch that should fix this warning. Here, I check whether or not PHP_MAJOR_VERSION is defined. If its not, we can definitely conclude that PHP version < 5.4
Comment #4
turek commentedWorks for me.Comment #5
turek commentedWell actually it only worked as I used that path while using PHP 5.3.x but when tested on PHP 5.2.6 it produces another warning, because it falls back into the first if statement and uses json_encode with 2 parameters - which produces notice on PHP version lower than 5.2.7.
That should be changed to this:
Comment #6
turek commentedComment #8
japerryDid a bit of reformatting and committed the change to this:
Comment #9
japerry