Commit 3c128a11 authored by Barnaby Walters's avatar Barnaby Walters

Fixed PHP 5.4 array syntax issue, closed #51

parent 0c7c6b72
......@@ -4,3 +4,4 @@ composer.phar
/vendor/
/tmp
.idea/
/bin/test
......@@ -123,7 +123,7 @@ function unicodeTrim($str) {
* @return string|array The prefixed name of the first microfomats class found or false
*/
function mfNamesFromClass($class, $prefix='h-') {
$class = str_replace([' ', ' ', "\n"], ' ', $class);
$class = str_replace(array(' ', ' ', "\n"), ' ', $class);
$classes = explode(' ', $class);
$matches = array();
......@@ -149,7 +149,7 @@ function nestedMfPropertyNamesFromClass($class) {
$prefixes = array('p-', 'u-', 'dt-', 'e-');
$propertyNames = array();
$class = str_replace([' ', ' ', "\n"], ' ', $class);
$class = str_replace(array(' ', ' ', "\n"), ' ', $class);
foreach (explode(' ', $class) as $classname) {
foreach ($prefixes as $prefix) {
if (strpos($classname, $prefix) === 0 and $classname !== $prefix) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment