Jump to content

Weird behavior of urls() in string concatenation


CalleRosa40
 Share

Recommended Posts

Hi,

Why does this

<?php
$test = urls('templates');
$templateCSS = '
	<link rel="stylesheet" href="' . urls('templates') . 'styles/uikit.min.css">
	<link rel="stylesheet" href="' . urls('templates') . 'styles/tom-select.css">
';

work in PW 3.0.165 and not this?

<?php
$templateCSS = '
	<link rel="stylesheet" href="' . urls('templates') . 'styles/uikit.min.css">
	<link rel="stylesheet" href="' . urls('templates') . 'styles/tom-select.css">
';

Second snippet makes PW throw "Fatal Error: Uncaught Error: Call to undefined function urls() in ...". First snippet outputs okay. These are the first few lines of one of my templates.

Sorry, if this is a dumb question, but I really don't get it. Am I being blind? Can anyone put me on the right track? Thanks a lot.

Link to comment
Share on other sites

  • CalleRosa40 changed the title to Weird behavior of urls() in string concatenation

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...