Open bobbingwide opened 8 years ago
This problem occurs in methods where self::CONSTANT is the default parameter. Changing the "::" to "__" prevents a Fatal, we just get a Notice about undefined constant. Since we don't yet handle class constants this isn't too much of an issue.
Revisit this to see if we can stop changing '::'
to '__'
in the light of the results produced when fixing #65.
In the latest documentation https://wordpress-seo.wp-a2z.org/oik_api/middlewarelog/ the constant is displayed as YoastSEO_Vendor\Psr\Log\LogLevel__INFO
When attempting to detect the default value of a parameter to a class method we need to be able to cater for parameters declared with default values such as self::MY_CLASS_CONSTANT
The problem occurs in ReflectionParameter->getDefaultValue() in \oik-shortcodes\shortcodes\oik-api-importer.php.
Temporary workaround
Change the code to use the literal value of the constant