{"id":1509,"date":"2022-08-30T15:17:07","date_gmt":"2022-08-30T15:17:07","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/26\/problem-about-kohana-3-2-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:17:07","modified_gmt":"2022-08-30T15:17:07","slug":"problem-about-kohana-3-2-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/problem-about-kohana-3-2-collection-of-common-programming-errors\/","title":{"rendered":"problem about kohana-3.2-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/acfeda29c615a77b4156f813381121a0?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAaron A<br \/>\nkohana-3 kohana-orm kohana-3.2<br \/>\nI have a model named permission. Permission has many roles permission has many users permission has many denied usersBelow is from the permissions model:protected $_has_many = array(&#8216;user&#8217; =&gt; array(&#8216;through&#8217; =&gt; &#8216;user_permission&#8217;),&#8217;permissiondeny&#8217; =&gt; array(&#8216;model&#8217; =&gt; &#8216;user&#8217;, &#8216;through&#8217; =&gt; &#8216;user_permissiondeny&#8217;,&#8217;foreign_key&#8217; =&gt; &#8216;permissiondeny_id&#8217;),&#8217;role&#8217; =&gt; array(&#8216;through&#8217; =&gt; &#8216;role_permission&#8217;), );The user and role relationships work as expected. I can select the deny perm<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/dee2a88178d7325f5a897b21c78d024a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nEmilie<br \/>\nphpunit kohana-3.2<br \/>\nI&#8217;m having trouble correctly setting up unit testing in Kohana 3.2.I installed PHPUnit. I changed the bootstrap to activate Kohana&#8217;s unittest module. I also changed the index.php file to look like this:if ( ! defined(&#8216;SUPPRESS_REQUEST&#8217;)) {echo Request::factory()-&gt;execute()-&gt;send_headers()-&gt;body(); }I created a folder tests in my application folder. In it, I inserted a phpunit.xml file that looks like this:&lt;phpunit colors=&#8221;true&#8221; bootstrap=&#8221;..\/..\/index.php&#8221;&gt; &lt;testsuites&gt;&lt;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/Y5GcX.jpg?s=32&amp;g=1\" \/><br \/>\nTarek<br \/>\nkohana kohana-3.2<br \/>\nI&#8217;m trying to add simple links in kohana inside a view inside a loop .Here is the code i have :echo HTML::anchor(Route::get(&#8216;parent&#8217;)-&gt;uri(array(&#8216;id&#8217; =&gt; $parent-&gt;id)), HTML::chars($parent-&gt;email))Now this return a link to root becauseRoute::get(&#8216;parent&#8217;)-&gt;uri(array(&#8216;id&#8217; =&gt; $parent-&gt;id)returns an empty string .Now if If i modify my Route::get to :Route::get(&#8216;parent&#8217;)-&gt;uri(array(&#8216;controller&#8217; =&gt; &#8216;parent&#8217; , &#8216;action&#8217; =&gt; &#8216;index&#8217; , &#8216;id&#8217; =&gt; $parent-&gt;id))<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e2e69b14874d2e894a12bbe185382de0?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nVictor Czechov<br \/>\nkohana kohana-3.2 query-builder<br \/>\nI need to INSERT a data to table, but before a query I must to know the MAX value from column position, than to INSERT a data WHERE my SELECTED before position+1. Is it possible with query builder?following my first comment I did query:$p = DB::select(array(DB::expr(&#8216;MAX(`position`)&#8217;, &#8216;p&#8217;)))-&gt;from(&#8216;supercategories&#8217;)-&gt;execute();echo $p;the error:ErrorException [ Notice ]: Undefined offset: 1MODPATH\\database\\classes\\kohana\\database.php [ 505 ]500 *\/ 501 public function quote_column<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/97009b6d6749fe8d30ddc4d224bac379?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nwitzawitz<br \/>\nunit-testing phpunit kohana cli kohana-3.2<br \/>\nI&#8217;ve configured kohana (3.2) unittest module as described here. So I have:APPPATH\/tests\/phpunit.xmlsampletest.phpAnd last lines index.php file:require APPPATH.&#8217;bootstrap&#8217;.EXT; if ( ! defined(&#8216;SUPPRESS_REQUEST&#8217;))Request::factory()-&gt;execute()-&gt;send_headers();So the first problem is that in CLI next error appears:ErrorException [ 8 ]: Undefined index: SERVER_NAME ~ SYSPATH\/classes\/kohana\/url.php [ 79 ]This happens because of E_STRICT enabled. So when I turn off E_STRICT nothing happens. I mea<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/af22ed6bb242a2a308ea74414a14e9ca?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nqiao<br \/>\norm kohana kohana-3.2<br \/>\nI trying to make many-to-many relation between 2 models: Users_Role and Users_Rightclass Model_Users_Role extends ORM{protected $_has_many = array(&#8216;rights&#8217; =&gt; array(&#8216;model&#8217; =&gt; &#8216;users_right&#8217;,&#8217;through&#8217; =&gt; &#8216;users_roles_rights&#8217;,),); }class Model_Users_Right extends ORM{ protected $_has_many = array(&#8216;roles&#8217; =&gt; array(&#8216;model&#8217; =&gt; &#8216;users_role&#8217;,&#8217;through&#8217; =&gt; &#8216;users_roles_rights&#8217;,),); }I&#8217;m trying to do this: $role = ORM::factory(&#8216;users_role&#8217;, 1); $right = ORM::factory(&#8216;users_right&#8217;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/MGhY2.png?s=32&amp;g=1\" \/><br \/>\nhakre<br \/>\nphp exception-handling kohana kohana-3.2<br \/>\nI have been looking around and following each tutorials,there is one which stands out. http:\/\/blog.lysender.com\/2011\/02\/kohana-3-1-migration-custom-error-pages\/ &lt;&#8211; i followed this tutorial and everything went smoothlythe error is being detected the exception is being handledbut there has been an exception that i cant seem to find. im currently having this exceptionFatal error: Exception thrown without a stack frame in Unknown on line 0all of my codes are thesame to the site-link. please help<\/li>\n<\/ul>\n<p id=\"rop\"><small>Originally posted 2013-11-26 05:55:38. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Aaron A kohana-3 kohana-orm kohana-3.2 I have a model named permission. Permission has many roles permission has many users permission has many denied usersBelow is from the permissions model:protected $_has_many = array(&#8216;user&#8217; =&gt; array(&#8216;through&#8217; =&gt; &#8216;user_permission&#8217;),&#8217;permissiondeny&#8217; =&gt; array(&#8216;model&#8217; =&gt; &#8216;user&#8217;, &#8216;through&#8217; =&gt; &#8216;user_permissiondeny&#8217;,&#8217;foreign_key&#8217; =&gt; &#8216;permissiondeny_id&#8217;),&#8217;role&#8217; =&gt; array(&#8216;through&#8217; =&gt; &#8216;role_permission&#8217;), );The user and role relationships work [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1509","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1509"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1509\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}