Our Blog

News, thoughts & useful links

Contact: Skype , email or call
+44 (0) 131 556 6818

Posts Tagged ‘php’

Class ‘Array’ not found error, sfCombineFilterPlugin in Symfony 1.0.x

If you are getting a “Class ‘Array’ not found” error when using sfCombineFilterPlugin then a quick fix would be to make the “filters.yml” file look like the following:

Read more about Class ‘Array’ not found error, sfCombineFilterPlugin in Symfony 1.0.x »

Symfony Notice: “Undefined offset: 0 in /symfony/util/Spyc.class.php”

If you are getting this notice “Undefined offset: 0 in /symfony/util/Spyc.class.php” in Symfony (especially after you clear your cache) check your yml files. You are most likely missing a colon somewhere or have some other error.

Read more about Symfony Notice: “Undefined offset: 0 in /symfony/util/Spyc.class.php” »

How to install GeoIP on CentOS

Follow these instructions to install GeoIP on CentOS:

Read more about How to install GeoIP on CentOS »

Basic guide to using Null and Not Null in Propel queries

Here is a quick hint on how to use Propel and its Criteria class to generate queries that need to have Null or Not Null in WHERE clauses:

Read more about Basic guide to using Null and Not Null in Propel queries »

Symfony: Ajax.Autocompleter is not a constructor

If you use Symfony and its Autocomletion feature, you may get the following error: "Ajax.Autocompleter is not a constructor"

Read more about Symfony: Ajax.Autocompleter is not a constructor »

“===” compare operator and strcmp() or stricmp() in PHP

Have you ever run into trouble when using strcmp() function and the match found at position 0 ? strcmp() returns either an index of the first match or FALSE, if the match is not found. It is easy to see that FALSE and 0 can sometimes be interpreted by PHP as the same thing (when clearly they are not).

Read more about “===” compare operator and strcmp() or stricmp() in PHP »

Convert Propel object to Array

To convert a Propel object (a database row representation) to a normal array use the following:

Read more about Convert Propel object to Array »