Coder Social home page Coder Social logo

yii-bootstrap's Issues

Declaration of BActiveForm::labelEx() should be compatible with that of CActiveForm::labelEx()

  1. Do not tell me about this php bug https://bugs.php.net/bug.php?id=46851. That bug has nothing to do with your poorly written code.
  2. On every development server use error_reporting = -1
  3. Always use error_reporting = -1 on dev. servers(maybe you missed first time)
  4. Let's see the actual bugs:
    • "Declaration of BActiveForm::labelEx() should be compatible with that of CActiveForm::labelEx()"
      • your method:public function labelEx(CModel $model, $attribute, $htmlOptions=array())
      • yii method : public function labelEx($model,$attribute,$htmlOptions=array())
      • Why the type hinting in your method?
      • Remove the CModel from your method and bam, the error just disappear.
    • "Declaration of BActiveForm::checkBox() should be compatible with that of CActiveForm::checkBox()"
      • your method:public function checkBox(CModel $model, $attribute, $htmlOptions=array())
      • yii method : public function checkBox($model,$attribute,$htmlOptions=array())
      • same shit as previous one, just remove the CModel from your method
    • "Declaration of BHtml::linkButton() should be compatible with that of CHtml::linkButton()"
      • your method:public static function linkButton($label, $url = '#', $htmlOptions = array())
      • yii method : public static function linkButton($label='submit',$htmlOptions=array())
      • seriously why? If you need that $url parameter just pass it through $htmlOptions array
      • remove the $url parameter from declaration and from return(return self::link($label, $url, $htmlOptions); --> return self::link($label, $htmlOptions); ).
  5. Only these three I have found, but most likely there are other. So error_reporting -1 and check again.

Sorry for my poor English, but is not my first language.

Bad Declarations in BHtml

Yii version: 1.1.1.0
yii-bootstrap v.0.2

I used webapp from yii/cli/views/webapp - copy to directory of my application
Copy yii-bootstrap files (exacly like in instruction)
Step by step with Your instruction

when i call page on localhost (XAMP): 'home' page, 'about' pages looks good, but 'contact' and 'login' generated error:

"Declaration of BActiveForm::labelEx() should be compatible with that of CActiveForm::labelEx()"

Sidebar title change

Sidebar title is "secondary content". That should either be skipped, changed to 'Menu' or changed to something customizable.

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.