Code Monkey home page Code Monkey logo

Comments (7)

JeffPyeBrook avatar JeffPyeBrook commented on May 25, 2024

Replaced WordPress repos plugin with GitHub master and a different error

[12-Jan-2016 07:36:32 America/New_York] PHP Warning: preg_match(): Compilation failed: missing ) at offset 22 in wp-content/plugins/autoptimize/classes/autoptimizeStyles.php on line 650

from autoptimize.

futtta avatar futtta commented on May 25, 2024

There indeed was a bug in 2.0.0 for those that activated the font-cdn-filter as reported by deny. This has already been fixed here on Github and will be in AO 2.0.1.

from autoptimize.

futtta avatar futtta commented on May 25, 2024

ah, a missing ), let me quickly check that out..

from autoptimize.

JeffPyeBrook avatar JeffPyeBrook commented on May 25, 2024

Should "#(background[^;}]*url\(#Ui" become "#\(background[^;}]*url\(#Ui"?

If so, will the regex match if there is a space between the '(' and 'background"? Should it match?

from autoptimize.

futtta avatar futtta commented on May 25, 2024

Still looking, but I think I simply forgot to remove the opening ( in the regex;

preg_match("#background[^;}]*url\(#Ui",$css)

can you try that?

frank

from autoptimize.

JeffPyeBrook avatar JeffPyeBrook commented on May 25, 2024

OK, the fix is live on this site if you want to look at the css

http://sparkle-gear.com/

Sorry my regex skills aren't that great, but it looks like the expression is trying to match a line that is a background declaration ending with a semicolon. Is it going to be a problem for CSS lines that do not end with the semicolon, as is sometimes the case with valid single attribute css statements like

body {
    background-image: url("paper.gif")
}

from autoptimize.

futtta avatar futtta commented on May 25, 2024

no, as it also looks for }, which it finds (on the next line), cfr. https://regex101.com/r/kU1kA7/1

not a regex-specialist either, but regex101.com is a huge help :-)

from autoptimize.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.