Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Default mode variables HeadScript and InlineScript #4798

Closed
wants to merge 2 commits into from

3 participants

@freax

Default mode variables use static:: constants

@mwillbanks
Collaborator

This has caused failures:

[concat] Fatal error: "static::" is not allowed in compile-time constants in /home/travis/build/zendframework/zf2/library/Zend/View/Helper/HeadScript.php on line 118

@freax

Of course, it must be the self:: keyword

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 10, 2013
  1. @freax
Commits on Jul 14, 2013
  1. @freax

    must be the self:: of course

    freax authored
This page is out of date. Refresh to see the latest.
View
2  library/Zend/View/Helper/HeadScript.php
@@ -115,7 +115,7 @@ public function __construct()
* @param string $type Script type and/or array of script attributes
* @return HeadScript
*/
- public function __invoke($mode = HeadScript::FILE, $spec = null, $placement = 'APPEND', array $attrs = array(), $type = 'text/javascript')
+ public function __invoke($mode = self::FILE, $spec = null, $placement = 'APPEND', array $attrs = array(), $type = 'text/javascript')
{
if ((null !== $spec) && is_string($spec)) {
$action = ucfirst(strtolower($mode));
View
2  library/Zend/View/Helper/InlineScript.php
@@ -35,7 +35,7 @@ class InlineScript extends HeadScript
* @param string $type Script type and/or array of script attributes
* @return InlineScript
*/
- public function __invoke($mode = HeadScript::FILE, $spec = null, $placement = 'APPEND', array $attrs = array(), $type = 'text/javascript')
+ public function __invoke($mode = self::FILE, $spec = null, $placement = 'APPEND', array $attrs = array(), $type = 'text/javascript')
{
return parent::__invoke($mode, $spec, $placement, $attrs, $type);
}
Something went wrong with that request. Please try again.