Error

Call to undefined function create_function()

/home/commodifyus_vps/commodify.us/protected/models/DataFormatter.php(1555)

1543     }
1544 
1545 
1546 
1547 
1548     /**
1549     * Translates a camel case string into a string with underscores (e.g. firstName -> first_name)
1550     * @param    string   $str    String in camel case format
1551     * @return    string            $str Translated into underscore format
1552     */
1553     public static function from_camel_case($str) {
1554         $str[0] = strtolower($str[0]);
1555         $func = create_function('$c', 'return " " . strtolower($c[1]);');
1556         return preg_replace_callback('/([A-Z])/', $func, $str);
1557     }
1558 
1559     /**
1560     * Translates a string with underscores into camel case (e.g. first_name -> firstName)
1561     * @param    string   $str                     String in underscore format
1562     * @param    bool     $capitalise_first_char   If true, capitalise the first char in $str
1563     * @return   string                              $str translated into camel caps
1564     */
1565     public static function to_camel_case($str, $capitalise_first_char = false) {
1566         if($capitalise_first_char) {
1567             $str[0] = strtoupper($str[0]);

Stack Trace

#0
+
 /home/commodifyus_vps/commodify.us/protected/modules/profile/views/profile/fbProfile.php(164): DataFormatter::from_camel_case("profile")
159                 <option>Jump to...</option>
160                 <?php
161                     // jump menu for links
162                     foreach ($extraData as $key => $arr){
163                         if ($key !== "detail"){
164                             print '<option value="#' .$key .'">'. ucwords(DataFormatter::from_camel_case($key)) .'</option>';
165                         }
166                     }
167                 ?>
168                 </select>
169             </form>
#5
+
 /home/commodifyus_vps/commodify.us/protected/modules/profile/controllers/YumProfileController.php(128): CController->render("fbProfile", array("model" => YumUser, "upload" => Uploads, "uploadProfile" => UploadProfiles, "hidePii" => true), false, true)
123                         'model' => $this->_model), false, true);
124         } else {
125             if ($upload->type == 'fbCombined') {
126                 $this->render('fbCombined', array('model' => $this->_model,'upload'=>$upload,'uploadProfile'=>$uploadProfile, 'hidePii'=>$hidePii), false, true);
127             } else if ($upload->type == 'fbProfile') {
128                 $this->render('fbProfile', array('model' => $this->_model,'upload'=>$upload,'uploadProfile'=>$uploadProfile, 'hidePii'=>$hidePii), false, true);
129             } else {
130                 $this->render('fbExtended', array('model' => $this->_model,'upload'=>$upload,'uploadProfile'=>$uploadProfile, 'hidePii'=>$hidePii), false, true);
131             }
132         }
133 
#20
+
 /home/commodifyus_vps/commodify.us/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2024-03-28 16:11:57 Apache Yii Framework/1.1.17